System.Attribute.Match C# (CSharp) Method

Match() public method

public Match ( Object obj ) : bool
obj Object
return bool
        public virtual bool Match(Object obj) { return Equals(obj); }
        #endregion

Usage Example

 /// <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));
     }
 }
All Usage Examples Of System.Attribute::Match