Ejemplo n.º 1
0
        // ReSharper disable NonReadonlyMemberInGetHashCode
        public override int GetHashCode()
        {
            int h = this.hash;

            if (0u >= (uint)h)
            {
                h         = PlatformDependent.HashCodeAscii(this.value, this.offset, this.length);
                this.hash = h;
            }

            return(h);
        }
Ejemplo n.º 2
0
        public static int GetHashCode(ICharSequence value)
        {
            switch (value)
            {
            case null:
                return(0);

            case AsciiString _:
                return(value.GetHashCode());

            default:
                return(PlatformDependent.HashCodeAscii(value));
            }
        }
Ejemplo n.º 3
0
 public int AsciiStringHashCode() => PlatformDependent.HashCodeAscii(
     this.asciiString.Array, this.asciiString.Offset, this.asciiString.Count);
Ejemplo n.º 4
0
 public int CharSequenceHashCode() => PlatformDependent.HashCodeAscii(this.stringValue);