コード例 #1
0
ファイル: FeatureManager.cs プロジェクト: radtek/Shopdrawing
 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);
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: FeatureManager.cs プロジェクト: radtek/Shopdrawing
 internal FeatureConnectorEntry(Type featureConnectorType, FeatureManager manager)
 {
     this._featureConnectorType = featureConnectorType;
     this._manager = manager;
 }