Esempio n. 1
0
        public bool Equals(IExtensionValue other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other is RepeatedExtensionValue <T> &&
                   field.Equals((other as RepeatedExtensionValue <T>).field) &&
                   codec.Equals((other as RepeatedExtensionValue <T>).codec));
        }
Esempio n. 2
0
        public bool Equals(IExtensionValue other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other is ExtensionValue <T> &&
                   codec.Equals((other as ExtensionValue <T>).codec) &&
                   Equals(field, (other as ExtensionValue <T>).field));
            // we check for equality in the codec since we could have equal field values however the values could be written in different ways
        }