Esempio n. 1
0
 public FilterValues(IFilter inner)
 {
     FilterMetadataType = inner.GetType();
     if (inner is IFilterFactory)
     {
         IsFactory = true;
         if (inner is ServiceFilterAttribute)
         {
             FilterType = ((ServiceFilterAttribute)inner).ServiceType;
         }
         else if (inner is TypeFilterAttribute)
         {
             FilterType = ((TypeFilterAttribute)inner).ImplementationType;
         }
     }
     if (FilterType != null)
     {
         FilterInterfaces = FilterType.GetInterfaces().ToList();
     }
     else
     {
         FilterInterfaces = FilterMetadataType.GetInterfaces().ToList();
     }
 }