| | | 1 | | //======================================================================= |
| | | 2 | | // NavigationStructuralLink.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 | | using System; |
| | | 9 | | |
| | | 10 | | namespace Trailblazer.Pathing; |
| | | 11 | | |
| | | 12 | | /// <summary>Stores one unique directed map dependency and its parallel edge count.</summary> |
| | | 13 | | internal readonly struct NavigationStructuralLink : IEquatable<NavigationStructuralLink> |
| | | 14 | | { |
| | | 15 | | internal NavigationStructuralLink( |
| | | 16 | | string destinationMapId, |
| | | 17 | | int count, |
| | | 18 | | int uncertifiedCount) |
| | | 19 | | { |
| | 379 | 20 | | DestinationMapId = destinationMapId; |
| | 379 | 21 | | Count = count; |
| | 379 | 22 | | UncertifiedCount = uncertifiedCount; |
| | 379 | 23 | | } |
| | | 24 | | |
| | | 25 | | internal string DestinationMapId { get; } |
| | | 26 | | |
| | | 27 | | internal int Count { get; } |
| | | 28 | | |
| | | 29 | | internal int UncertifiedCount { get; } |
| | | 30 | | |
| | | 31 | | public bool Equals(NavigationStructuralLink other) => |
| | 2 | 32 | | Count == other.Count |
| | 2 | 33 | | && UncertifiedCount == other.UncertifiedCount |
| | 2 | 34 | | && string.Equals(DestinationMapId, other.DestinationMapId, StringComparison.Ordinal); |
| | | 35 | | } |