| | | 1 | | //======================================================================= |
| | | 2 | | // MantleValidationSnapshot.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.Navigation.Motor; |
| | | 9 | | |
| | | 10 | | /// <summary> |
| | | 11 | | /// Immutable validation result describing whether an active mantle may continue. |
| | | 12 | | /// </summary> |
| | | 13 | | public readonly struct MantleValidationSnapshot |
| | | 14 | | { |
| | | 15 | | /// <summary> |
| | | 16 | | /// Reusable allow snapshot. |
| | | 17 | | /// </summary> |
| | 1 | 18 | | public static readonly MantleValidationSnapshot Continue = new(true); |
| | | 19 | | |
| | | 20 | | /// <summary> |
| | | 21 | | /// Reusable cancel snapshot. |
| | | 22 | | /// </summary> |
| | 1 | 23 | | public static readonly MantleValidationSnapshot Cancel = new(false); |
| | | 24 | | |
| | | 25 | | /// <summary> |
| | | 26 | | /// Initializes a new mantle validation snapshot. |
| | | 27 | | /// </summary> |
| | | 28 | | public MantleValidationSnapshot(bool canContinueMantle) |
| | | 29 | | { |
| | 2 | 30 | | CanContinueMantle = canContinueMantle; |
| | 2 | 31 | | } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets a value indicating whether the mantle action can be continued. |
| | | 35 | | /// </summary> |
| | | 36 | | public bool CanContinueMantle { get; } |
| | | 37 | | } |