Match() public method

public Match ( Object obj ) : bool
obj Object
return bool
Ejemplo n.º 1
0
 /// <devdoc> 
 ///     This function takes an info and an attribute and determines whether 
 ///     the info satisfies the particular attribute.  This either means that the info 
 ///     contains the attribute or the info does not contain the attribute and the default 
 ///     for the attribute matches the passed in attribute. 
 /// </devdoc> 
 /// <internalonly/> 
 internal static bool ShouldHideMember(MemberDescriptor info, Attribute attribute) {
     if (info == null || attribute == null) {
         return true;
     }
     Attribute infoAttribute = info.Attributes[attribute.GetType()];
     if (infoAttribute == null)
         return !attribute.IsDefaultAttribute();
     else {
         return !(attribute.Match(infoAttribute));
     }
 }
Ejemplo n.º 2
0
        /// <devdoc> 
        ///     This function takes a member descriptor and an attribute and determines whether 
        ///     the member satisfies the particular attribute.  This either means that the member 
        ///     contains the attribute or the member does not contain the attribute and the default 
        ///     for the attribute matches the passed in attribute. 
        /// </devdoc> 
        private static bool ShouldHideMember(MemberDescriptor member, Attribute attribute) 
        {
            if (member == null || attribute == null) 
            {
                return true;
            }

            Attribute memberAttribute = member.Attributes[attribute.GetType()];
            if (memberAttribute == null)
            {
                return !attribute.IsDefaultAttribute();
            }
            else 
            {
                return !(attribute.Match(memberAttribute));
            }
        }
 private static bool ShouldHideMember(MemberDescriptor member, Attribute attribute)
 {
     if ((member == null) || (attribute == null))
     {
         return true;
     }
     Attribute attribute2 = member.Attributes[attribute.GetType()];
     if (attribute2 == null)
     {
         return !attribute.IsDefaultAttribute();
     }
     return !attribute.Match(attribute2);
 }