Exemple #1
0
        public override bool Equals(object obj)
        {
            ExtendableMessageLite <TMessage, TBuilder> other = obj as ExtendableMessageLite <TMessage, TBuilder>;

            return(!ReferenceEquals(null, other) &&
                   Dictionaries.Equals(extensions.AllFields, other.extensions.AllFields));
        }
Exemple #2
0
        public override bool Equals(object other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }
            UnknownFieldSet otherSet = other as UnknownFieldSet;

            return(otherSet != null && Dictionaries.Equals(fields, otherSet.fields));
        }
Exemple #3
0
        /// <summary>
        /// Compares the specified object with this message for equality.
        /// Returns true iff the given object is a message of the same type
        /// (as defined by DescriptorForType) and has identical values
        /// for all its fields.
        /// </summary>
        public override bool Equals(object other)
        {
            if (other == this)
            {
                return(true);
            }
            IMessage otherMessage = other as IMessage;

            if (otherMessage == null || otherMessage.DescriptorForType != DescriptorForType)
            {
                return(false);
            }
            return(Dictionaries.Equals(AllFields, otherMessage.AllFields) && UnknownFields.Equals(otherMessage.UnknownFields));
        }
Exemple #4
0
        public override bool Equals(object obj)
        {
            ExtendableMessageLite <TMessage, TBuilder> extendableMessageLite = obj as ExtendableMessageLite <TMessage, TBuilder>;

            return(!object.ReferenceEquals(null, extendableMessageLite) && Dictionaries.Equals <IFieldDescriptorLite, object>(this.extensions.AllFields, extendableMessageLite.extensions.AllFields));
        }