コード例 #1
0
 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()));
 }
コード例 #2
0
ファイル: Reflection.cs プロジェクト: AdamSobieski/Logic
 public virtual bool Equals(FunctorInfo other)
 {
     if (!DeclaringType.Equals(other.DeclaringType))
     {
         return(false);
     }
     if (!Name.Equals(other.Name))
     {
         return(false);
     }
     return(true);
 }
コード例 #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));
        }
コード例 #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));
        }
コード例 #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));
        }
コード例 #6
0
        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)));
        }
コード例 #7
0
ファイル: Method.cs プロジェクト: sunithan/Plainion.GraphViz
 public bool Equals(Method other)
 {
     return(DeclaringType.Equals(other.DeclaringType) && Name.Equals(other.Name));
 }