Exemplo n.º 1
0
        /// <summary>
        /// Equalses the specified other.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public bool Equals(TypeHash other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            if (InformalInterface != null || other.InformalInterface != null)
            {
                if (InformalInterface == null || other.InformalInterface == null)
                {
                    return(false);
                }

                if (Types.Length != other.Types.Length)
                {
                    return(false);
                }

                var tTypes = Types.SequenceEqual(other.Types);

                if (!tTypes)
                {
                    return(false);
                }

                return(InformalInterface.SequenceEqual(other.InformalInterface));
            }


            return(Types.SequenceEqual(other.Types));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Equalses the specified other.
        /// </summary>
        /// <param name="other">The other.</param>
        /// <returns></returns>
        public bool Equals(TypeHash other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            if (InformalInterface != null || other.InformalInterface != null)
            {
                if (InformalInterface == null || other.InformalInterface == null)
                    return false;

                if (Types.Length != other.Types.Length)
                    return false;

                var tTypes = Types.SequenceEqual(other.Types);

                if (!tTypes)
                    return false;

                return InformalInterface.SequenceEqual(other.InformalInterface);
            }


            return Types.SequenceEqual(other.Types);
        }