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())); }
public virtual bool Equals(FunctorInfo other) { if (!DeclaringType.Equals(other.DeclaringType)) { return(false); } if (!Name.Equals(other.Name)) { return(false); } return(true); }
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)); }
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)); }
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))); }
public bool Equals(Method other) { return(DeclaringType.Equals(other.DeclaringType) && Name.Equals(other.Name)); }