Example #1
0
 private static IEnumerable <FeatureProvider> CreateFeatureProviders(Type featureProviderType, IEnumerable <object> attrs, Predicate <Type> match)
 {
     foreach (Attribute attribute in attrs)
     {
         FeatureAttribute fAttrib = attribute as FeatureAttribute;
         if (fAttrib != null)
         {
             Type fType = fAttrib.FeatureProviderType;
             if (featureProviderType.IsAssignableFrom(fType) && match(fType))
             {
                 FeatureProvider featureProvider = FeatureManager.CreateFeatureProvider(fType);
                 if (featureProvider != null)
                 {
                     yield return(featureProvider);
                 }
             }
         }
     }
 }
Example #2
0
 internal FeatureConnectorEntry(Type featureConnectorType, FeatureManager manager)
 {
     this._featureConnectorType = featureConnectorType;
     this._manager = manager;
 }