public override bool Equals(object obj)
 {
     // We don't need to compare the invokees
     // But do we need to compare the contexts and return types?
     return(obj is VirtualMethodBase other &&
            Name == other.Name &&
            DeclaringType.Equals(other.DeclaringType) &&
            CollectionServices.CompareArrays(GetParameterTypes(), other.GetParameterTypes()));
 }
Ejemplo n.º 2
0
 public virtual bool Equals(FunctorInfo other)
 {
     if (!DeclaringType.Equals(other.DeclaringType))
     {
         return(false);
     }
     if (!Name.Equals(other.Name))
     {
         return(false);
     }
     return(true);
 }
Ejemplo n.º 3
0
        public bool Equals(ConstructorDefinition other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            // Check if other is a null reference by using ReferenceEquals because
            // we overload the == operator. If other isn't actually null then
            // we get an infinite loop where we're constantly trying to compare to null.
            return(!ReferenceEquals(other, null) &&
                   DeclaringType.Equals(other.DeclaringType) &&
                   Parameters.SequenceEqual(other.Parameters));
        }
Ejemplo n.º 4
0
        public override bool Equals(Object obj)
        {
            if (obj == this)
            {
                return(true);
            }
            if (!GetType().Equals(obj.GetType()))
            {
                return(false);
            }
            MemberEnhancementHint other = (MemberEnhancementHint)obj;

            return(DeclaringType.Equals(other.DeclaringType) && MemberName.Equals(other.MemberName));
        }
Ejemplo n.º 5
0
        public bool Equals(PropertyDefinition other)
        {
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            // Check if other is a null reference by using ReferenceEquals because
            // we overload the == operator. If other isn't actually null then
            // we get an infinite loop where we're constantly trying to compare to null.
            return(!ReferenceEquals(other, null) &&
                   DeclaringType.Equals(other.DeclaringType) &&
                   string.Equals(PropertyName, other.PropertyName, StringComparison.OrdinalIgnoreCase) &&
                   PropertyType.Equals(other.PropertyType));
        }
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }

            XMethodInstanceReference mie = obj as XMethodInstanceReference;

            if (mie == null)
            {
                return(false);
            }

            return(DeclaringType.Equals(mie.DeclaringType) &&
                   ((GenericMethod == mie.GenericMethod) ||
                    (GenericMethod != null && GenericMethod.Equals(mie.GenericMethod))) &&
                   (GenericArguments.Equals(mie.genericArguments)) &&
                   (Parameters.Equals(mie.Parameters)));
        }
Ejemplo n.º 7
0
 public bool Equals(Method other)
 {
     return(DeclaringType.Equals(other.DeclaringType) && Name.Equals(other.Name));
 }