| | | 1 | | //======================================================================= |
| | | 2 | | // PreparedNavigationOverlay.cs |
| | | 3 | | //======================================================================= |
| | | 4 | | // MIT License, Copyright (c) 2024-present David Oravsky (mrdav30) |
| | | 5 | | // See LICENSE file in the project root for full license information. |
| | | 6 | | //======================================================================= |
| | | 7 | | |
| | | 8 | | namespace Trailblazer.Pathing; |
| | | 9 | | |
| | | 10 | | /// <summary>Wraps an immutable validated overlay transaction before deterministic admission.</summary> |
| | | 11 | | public sealed class PreparedNavigationOverlay |
| | | 12 | | { |
| | | 13 | | /// <summary>Creates an inert prepared-overlay descriptor from an immutable transaction.</summary> |
| | 301 | 14 | | public PreparedNavigationOverlay(NavigationOverlayTransaction transaction) |
| | | 15 | | { |
| | 301 | 16 | | SwiftThrowHelper.ThrowIfNull(transaction, nameof(transaction)); |
| | 301 | 17 | | Transaction = transaction; |
| | 301 | 18 | | } |
| | | 19 | | |
| | | 20 | | /// <summary>Gets the immutable overlay transaction.</summary> |
| | | 21 | | public NavigationOverlayTransaction Transaction { get; } |
| | | 22 | | |
| | | 23 | | /// <summary>Gets the deterministic descriptor-byte reservation.</summary> |
| | 858 | 24 | | public long DescriptorBytes => Transaction.EstimatedDescriptorBytes; |
| | | 25 | | } |