当前位置: 首页>>代码示例>>C#>>正文


C# IExtensionManager类代码示例

本文整理汇总了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;
 }
开发者ID:MichaelPetrinolis,项目名称:Orchard2,代码行数:7,代码来源:ThemeManager.cs

示例2: DataMigrationCommands

 public DataMigrationCommands(
     IDataMigrationManager dataMigrationManager,
     IExtensionManager extensionManager
     ) {
     _dataMigrationManager = dataMigrationManager;
     _extensionManager = extensionManager;
 }
开发者ID:rupertwhitlock,项目名称:IncreasinglyAbsorbing,代码行数:7,代码来源:DataMigrationCommands.cs

示例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>();
        }
开发者ID:rupertwhitlock,项目名称:IncreasinglyAbsorbing,代码行数:30,代码来源:CodeGenerationCommandsTests.cs

示例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;
        }
开发者ID:wezmag,项目名称:Coevery,代码行数:26,代码来源:PlacementService.cs

示例5: SiteThemeService

 public SiteThemeService(IExtensionManager extensionManager, IWorkContextAccessor workContextAccessor)
 {
     _extensionManager = extensionManager;
     _workContextAccessor = workContextAccessor;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
开发者ID:stack72,项目名称:GiveCamp-London,代码行数:7,代码来源:SiteThemeService.cs

示例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;
        }
开发者ID:Zlatinsz,项目名称:podnebeto,代码行数:30,代码来源:AdminController.cs

示例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;
        }
开发者ID:juaqaai,项目名称:CompanyGroup,代码行数:26,代码来源:AdminController.cs

示例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;
        }
开发者ID:CAPCHIK,项目名称:roslyn,代码行数:32,代码来源:CodeRefactoringProducer.cs

示例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;
        }
开发者ID:Higea,项目名称:Orchard,代码行数:25,代码来源:ThemeService.cs

示例10: ModuleService

 public ModuleService(IOrchardServices orchardServices, IExtensionManager extensionManager,
                      IShellDescriptorManager shellDescriptorManager) {
     Services = orchardServices;
     _extensionManager = extensionManager;
     _shellDescriptorManager = shellDescriptorManager;
     T = NullLocalizer.Instance;
 }
开发者ID:mofashi2011,项目名称:orchardcms,代码行数:7,代码来源:ModuleService.cs

示例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);
     }
 }
开发者ID:Rickinio,项目名称:roslyn,代码行数:29,代码来源:AbstractCodeRefactoringService.cs

示例12: ShapePlacementParsingStrategy

 public ShapePlacementParsingStrategy(
     IExtensionManager extensionManager,
     ShellDescriptor shellDescriptor,
     IPlacementFileParser placementFileParser) {
     _extensionManager = extensionManager;
     _shellDescriptor = shellDescriptor;
     _placementFileParser = placementFileParser;
 }
开发者ID:maxpavlov,项目名称:HumanizedOrchard,代码行数:8,代码来源:ShapePlacementParsingStrategy.cs

示例13: HackInstallationGenerator

 public HackInstallationGenerator(
     IExtensionManager extensionManager,
     IEnumerable<IExtensionManagerEvents> extensionEvents)
 {
     _extensionManager = extensionManager;
     _extensionEvents = extensionEvents;
     Logger = NullLogger.Instance;
 }
开发者ID:mofashi2011,项目名称:orchardcms,代码行数:8,代码来源:HackInstallationGenerator.cs

示例14: RecipesCommands

 public RecipesCommands(
     IRecipeHarvester recipeHarvester,
     IExtensionManager extensionManager,
     IStringLocalizer<RecipesCommands> localizer) : base(localizer)
 {
     _recipeHarvester = recipeHarvester;
     _extensionManager = extensionManager;
 }
开发者ID:jchenga,项目名称:Orchard2,代码行数:8,代码来源:RecipesCommands.cs

示例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>();
 }
开发者ID:mofashi2011,项目名称:orchardcms,代码行数:8,代码来源:ExtensionManagerTests.cs


注:本文中的IExtensionManager类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。