Пример #1
0
 /// <summary>
 /// Initializes a new instance of a ExtensionProvider at the given root directory.
 /// </summary>
 /// <param name="hostingEnvironment">hostingEnvironment containing the fileproviders.</param>
 /// <param name="manifestBuilder">The manifest provider.</param>
 /// <param name="featureManager">The feature manager.</param>
 public ExtensionProvider(
     IHostingEnvironment hostingEnvironment,
     IEnumerable <IFeaturesProvider> featureProviders)
 {
     _fileProvider     = hostingEnvironment.ContentRootFileProvider;
     _featuresProvider = new CompositeFeaturesProvider(featureProviders);
 }
 public ExtensionManager(IApplicationContext applicationContext, IEnumerable <IExtensionDependencyStrategy> extensionDependencyStrategies, IEnumerable <IExtensionPriorityStrategy> extensionPriorityStrategies, ITypeFeatureProvider typeFeatureProvider, IFeaturesProvider featuresProvider, ILogger <ExtensionManager> logger)
 {
     this._featureDependencies = new ConcurrentDictionary <string, Lazy <IEnumerable <IFeatureInfo> > >();
     this._dependentFeatures   = new ConcurrentDictionary <string, Lazy <IEnumerable <IFeatureInfo> > >();
     this._semaphore           = new SemaphoreSlim(1);
     base();
     this._applicationContext            = applicationContext;
     this._extensionDependencyStrategies = extensionDependencyStrategies;
     this._extensionPriorityStrategies   = extensionPriorityStrategies;
     this._typeFeatureProvider           = typeFeatureProvider;
     this._featuresProvider = featuresProvider;
     this.set_L(logger);
     return;
 }
Пример #3
0
 public ExtensionManager(
     IApplicationContext applicationContext,
     IEnumerable <IExtensionDependencyStrategy> extensionDependencyStrategies,
     IEnumerable <IExtensionPriorityStrategy> extensionPriorityStrategies,
     ITypeFeatureProvider typeFeatureProvider,
     IFeaturesProvider featuresProvider,
     ILogger <ExtensionManager> logger)
 {
     _applicationContext            = applicationContext;
     _extensionDependencyStrategies = extensionDependencyStrategies;
     _extensionPriorityStrategies   = extensionPriorityStrategies;
     _typeFeatureProvider           = typeFeatureProvider;
     _featuresProvider = featuresProvider;
     L = logger;
 }
Пример #4
0
 public PluginManager(
     IHostingEnvironment hostingEnvironment,
     IEnumerable <IPluginDependencyStrategy> pluginDependencyStrategies,
     IEnumerable <IPluginPriorityStrategy> pluginPriorityStrategies,
     ITypeFeatureProvider typeFeatureProvider,
     IFeaturesProvider featuresProvider,
     ILogger <PluginManager> logger)
 {
     _hostingEnvironment         = hostingEnvironment;
     _pluginDependencyStrategies = pluginDependencyStrategies;
     _pluginPriorityStrategies   = pluginPriorityStrategies;
     _typeFeatureProvider        = typeFeatureProvider;
     _featuresProvider           = featuresProvider;
     L = logger;
 }
Пример #5
0
 public ExtensionManager(
     IHostingEnvironment hostingEnvironment,
     IEnumerable <IExtensionDependencyStrategy> extensionDependencyStrategies,
     IEnumerable <IExtensionPriorityStrategy> extensionPriorityStrategies,
     ITypeFeatureProvider typeFeatureProvider,
     IFeaturesProvider featuresProvider,
     ILogger <ExtensionManager> logger)
 {
     _hostingEnvironment            = hostingEnvironment;
     _extensionDependencyStrategies = extensionDependencyStrategies;
     _extensionPriorityStrategies   = extensionPriorityStrategies;
     _typeFeatureProvider           = typeFeatureProvider;
     _featuresProvider = featuresProvider;
     L = logger;
 }
Пример #6
0
 public ExtensionManager(
     IHostingEnvironment hostingEnvironment,
     IOptions <ManifestOptions> manifestOptionsAccessor,
     IEnumerable <IExtensionDependencyStrategy> extensionDependencyStrategies,
     IEnumerable <IExtensionPriorityStrategy> extensionPriorityStrategies,
     ITypeFeatureProvider typeFeatureProvider,
     IFeaturesProvider featuresProvider,
     ILogger <ExtensionManager> logger,
     IStringLocalizer <ExtensionManager> localizer)
 {
     _hostingEnvironment            = hostingEnvironment;
     _manifestOptions               = manifestOptionsAccessor.Value;
     _extensionDependencyStrategies = extensionDependencyStrategies;
     _extensionPriorityStrategies   = extensionPriorityStrategies;
     _typeFeatureProvider           = typeFeatureProvider;
     _featuresProvider              = featuresProvider;
     L = logger;
     T = localizer;
 }
Пример #7
0
 public FeaturesManager(IFeaturesProvider provider)
 {
     _features = provider.GetFeatures().ToList();
 }