本文整理汇总了C#中IExtensionManager类的典型用法代码示例。如果您正苦于以下问题:C# IExtensionManager类的具体用法?C# IExtensionManager怎么用?C# IExtensionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IExtensionManager类属于命名空间,在下文中一共展示了IExtensionManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThemeManager
public ThemeManager(
IEnumerable<IThemeSelector> themeSelectors,
IExtensionManager extensionManager)
{
_themeSelectors = themeSelectors;
_extensionManager = extensionManager;
}
示例2: DataMigrationCommands
public DataMigrationCommands(
IDataMigrationManager dataMigrationManager,
IExtensionManager extensionManager
) {
_dataMigrationManager = dataMigrationManager;
_extensionManager = extensionManager;
}
示例3: Init
public void Init() {
string databaseFileName = Path.GetTempFileName();
IDataServicesProviderFactory dataServicesProviderFactory = new DataServicesProviderFactory(new[] {
new Meta<CreateDataServicesProvider>(
(dataFolder, connectionString) => new SqlCeDataServicesProvider(dataFolder, connectionString),
new Dictionary<string, object> {{"ProviderName", "SqlCe"}})
});
var builder = new ContainerBuilder();
builder.RegisterInstance(new ShellBlueprint());
builder.RegisterInstance(new ShellSettings { Name = ShellSettings.DefaultName, DataTablePrefix = "Test", DataProvider = "SqlCe" });
builder.RegisterInstance(dataServicesProviderFactory).As<IDataServicesProviderFactory>();
builder.RegisterInstance(AppDataFolderTests.CreateAppDataFolder(Path.GetDirectoryName(databaseFileName))).As<IAppDataFolder>();
builder.RegisterType<SqlCeDataServicesProvider>().As<IDataServicesProvider>();
builder.RegisterType<SessionConfigurationCache>().As<ISessionConfigurationCache>();
builder.RegisterType<SessionFactoryHolder>().As<ISessionFactoryHolder>();
builder.RegisterType<CompositionStrategy>().As<ICompositionStrategy>();
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
builder.RegisterType<SchemaCommandGenerator>().As<ISchemaCommandGenerator>();
builder.RegisterType<StubCacheManager>().As<ICacheManager>();
builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
builder.RegisterType<StubHostEnvironment>().As<IHostEnvironment>();
_container = builder.Build();
_extensionManager = _container.Resolve<IExtensionManager>();
_schemaCommandGenerator = _container.Resolve<ISchemaCommandGenerator>();
}
示例4: PlacementService
public PlacementService(
IContentManager contentManager,
ISiteThemeService siteThemeService,
IExtensionManager extensionManager,
IShapeFactory shapeFactory,
IShapeTableLocator shapeTableLocator,
RequestContext requestContext,
IEnumerable<IContentPartDriver> contentPartDrivers,
IEnumerable<IContentFieldDriver> contentFieldDrivers,
IVirtualPathProvider virtualPathProvider,
IWorkContextAccessor workContextAccessor
)
{
_contentManager = contentManager;
_siteThemeService = siteThemeService;
_extensionManager = extensionManager;
_shapeFactory = shapeFactory;
_shapeTableLocator = shapeTableLocator;
_requestContext = requestContext;
_contentPartDrivers = contentPartDrivers;
_contentFieldDrivers = contentFieldDrivers;
_virtualPathProvider = virtualPathProvider;
_workContextAccessor = workContextAccessor;
Logger = NullLogger.Instance;
}
示例5: SiteThemeService
public SiteThemeService(IExtensionManager extensionManager, IWorkContextAccessor workContextAccessor)
{
_extensionManager = extensionManager;
_workContextAccessor = workContextAccessor;
Logger = NullLogger.Instance;
T = NullLocalizer.Instance;
}
示例6: AdminController
public AdminController(
IEnumerable<IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
IOrchardServices services,
IModuleService moduleService,
IDataMigrationManager dataMigrationManager,
IReportsCoordinator reportsCoordinator,
IExtensionManager extensionManager,
IFeatureManager featureManager,
IRecipeHarvester recipeHarvester,
IRecipeManager recipeManager,
ShellDescriptor shellDescriptor,
ShellSettings shellSettings,
IShapeFactory shapeFactory)
{
Services = services;
_extensionDisplayEventHandler = extensionDisplayEventHandlers.FirstOrDefault();
_moduleService = moduleService;
_dataMigrationManager = dataMigrationManager;
_reportsCoordinator = reportsCoordinator;
_extensionManager = extensionManager;
_featureManager = featureManager;
_recipeHarvester = recipeHarvester;
_recipeManager = recipeManager;
_shellDescriptor = shellDescriptor;
_shellSettings = shellSettings;
Shape = shapeFactory;
T = NullLocalizer.Instance;
Logger = NullLogger.Instance;
}
示例7: AdminController
public AdminController(
IEnumerable<IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
IOrchardServices services,
IDataMigrationManager dataMigraitonManager,
IFeatureManager featureManager,
ISiteThemeService siteThemeService,
IExtensionManager extensionManager,
ShellDescriptor shellDescriptor,
IPreviewTheme previewTheme,
IThemeService themeService,
IReportsCoordinator reportsCoordinator) {
Services = services;
_extensionDisplayEventHandler = extensionDisplayEventHandlers.FirstOrDefault();
_dataMigrationManager = dataMigraitonManager;
_siteThemeService = siteThemeService;
_extensionManager = extensionManager;
_shellDescriptor = shellDescriptor;
_featureManager = featureManager;
_previewTheme = previewTheme;
_themeService = themeService;
_reportsCoordinator = reportsCoordinator;
T = NullLocalizer.Instance;
Logger = NullLogger.Instance;
}
示例8: GetRefactoringFromProvider
private async Task<CodeRefactoring> GetRefactoringFromProvider(
CodeRefactoringProvider provider,
IExtensionManager extensionManager,
CodeRefactoringContext context)
{
context.CancellationToken.ThrowIfCancellationRequested();
if (extensionManager.IsDisabled(provider))
{
return null;
}
try
{
var actions = await provider.GetRefactoringsAsync(context).ConfigureAwait(false);
if (actions != null && actions.Count() > 0)
{
return new CodeRefactoring(provider, actions);
}
}
catch (OperationCanceledException)
{
// We don't want to catch operation canceled exceptions in the catch block
// below. So catch is here and rethrow it.
throw;
}
catch (Exception e)
{
extensionManager.HandleException(provider, e);
}
return null;
}
示例9: ThemeService
public ThemeService(
IOrchardServices orchardServices,
IExtensionManager extensionManager,
IFeatureManager featureManager,
IEnumerable<IThemeSelector> themeSelectors,
IVirtualPathProvider virtualPathProvider,
ICacheManager cacheManager,
ISiteThemeService siteThemeService) {
Services = orchardServices;
_extensionManager = extensionManager;
_featureManager = featureManager;
_themeSelectors = themeSelectors;
_virtualPathProvider = virtualPathProvider;
_cacheManager = cacheManager;
_siteThemeService = siteThemeService;
if (_featureManager.FeatureDependencyNotification == null) {
_featureManager.FeatureDependencyNotification = GenerateWarning;
}
Logger = NullLogger.Instance;
T = NullLocalizer.Instance;
}
示例10: ModuleService
public ModuleService(IOrchardServices orchardServices, IExtensionManager extensionManager,
IShellDescriptorManager shellDescriptorManager) {
Services = orchardServices;
_extensionManager = extensionManager;
_shellDescriptorManager = shellDescriptorManager;
T = NullLocalizer.Instance;
}
示例11: AddRefactoringAsync
private async Task AddRefactoringAsync(
CodeRefactoringProvider provider,
List<CodeRefactoring> allRefactorings,
IExtensionManager extensionManager,
CodeRefactoringContext context)
{
try
{
if (!extensionManager.IsDisabled(provider))
{
using (Logger.LogBlock(FeatureId.CodeActions, FunctionId.CodeAction_AddRefactoring, codeRefactoringDescription, provider, context.Span, context.CancellationToken))
{
var actions = await provider.GetRefactoringsAsync(context).ConfigureAwait(false);
if (actions != null && actions.Count() > 0)
{
allRefactorings.Add(new CodeRefactoring(provider, actions));
}
}
}
}
catch (OperationCanceledException)
{
throw;
}
catch (Exception e)
{
extensionManager.HandleException(provider, e);
}
}
示例12: ShapePlacementParsingStrategy
public ShapePlacementParsingStrategy(
IExtensionManager extensionManager,
ShellDescriptor shellDescriptor,
IPlacementFileParser placementFileParser) {
_extensionManager = extensionManager;
_shellDescriptor = shellDescriptor;
_placementFileParser = placementFileParser;
}
示例13: HackInstallationGenerator
public HackInstallationGenerator(
IExtensionManager extensionManager,
IEnumerable<IExtensionManagerEvents> extensionEvents)
{
_extensionManager = extensionManager;
_extensionEvents = extensionEvents;
Logger = NullLogger.Instance;
}
示例14: RecipesCommands
public RecipesCommands(
IRecipeHarvester recipeHarvester,
IExtensionManager extensionManager,
IStringLocalizer<RecipesCommands> localizer) : base(localizer)
{
_recipeHarvester = recipeHarvester;
_extensionManager = extensionManager;
}
示例15: Init
public void Init() {
var builder = new ContainerBuilder();
_folders = new StubFolders();
builder.RegisterInstance(_folders).As<IExtensionFolders>();
builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
_container = builder.Build();
_manager = _container.Resolve<IExtensionManager>();
}