Beispiel #1
0
 public IEnumerable <IAttribute> GetAttributes(IMemberInfo memberInfo, IAttributeDescriptor descriptor)
 {
     if (memberInfo == null)
     {
         throw new ArgumentNullException(nameof(memberInfo));
     }
     if (descriptor == null)
     {
         throw new ArgumentNullException(nameof(descriptor));
     }
     return(memberInfo.GetCustomAttributes <Attribute>().Where(attribute => MatchTypeName(attribute.GetType(), descriptor.FullTypeName)).Select(attribute => _attributeFactory(descriptor, attribute)).Where(attribute => MatchAttribute(attribute, descriptor)));
 }