public override int GetHashCode()
        {
            int hash = StartOffset.GetHashCode() ^ EndOffset.GetHashCode();

            if (IsString)
            {
                return(hash ^ StringValue.GetHashCode());
            }

            return(hash ^ ExtensionValue.GetHashCode());
        }
        public override int GetHashCode()
        {
            unchecked {
                int hash = ExtensionType.GetHashCode() ^
                           StartOffset.GetHashCode() ^
                           EndOffset.GetHashCode();

                foreach (var value in PositionalArguments)
                {
                    hash ^= value.GetHashCode();
                }

                foreach (var pair in NamedArguments)
                {
                    hash = hash ^ pair.Key.GetHashCode() ^ pair.Value.GetHashCode();
                }

                return(hash);
            }
        }
Exemplo n.º 3
0
 /// <inheritdoc cref="object"/>
 public override int GetHashCode()
 => StartOffset.GetHashCode() * 397 ^ EndOffset.GetHashCode() * 397 ^ Count.GetHashCode() * 397;