コード例 #1
0
ファイル: Portal.cs プロジェクト: ErgodicMage/StellarMap
        public override int GetHashCode()
        {
            int hash = base.GetHashCode();

            if (StarIdentifier != null)
            {
                hash ^= StarIdentifier.GetHashCode();
            }
            if (!string.IsNullOrEmpty(ERBridgeIdentifier))
            {
                hash ^= ERBridgeIdentifier.GetHashCode();
            }

            hash ^= Position.GetHashCode();

            return(hash);
        }
コード例 #2
0
ファイル: Portal.cs プロジェクト: ErgodicMage/StellarMap
 public bool Equals(Portal other) =>
 StarIdentifier.Equals(other.StarIdentifier) && ERBridgeIdentifier.Equals(other.ERBridgeIdentifier) &&
 Position.Equals(other.Position);