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


C# Models.ShellDescriptor类代码示例

本文整理汇总了C#中Orchard.Environment.Descriptor.Models.ShellDescriptor的典型用法代码示例。如果您正苦于以下问题:C# ShellDescriptor类的具体用法?C# ShellDescriptor怎么用?C# ShellDescriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ShellDescriptor类属于Orchard.Environment.Descriptor.Models命名空间,在下文中一共展示了ShellDescriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: 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

示例2: foreach

        void IShellDescriptorManagerEventHandler.Changed(ShellDescriptor descriptor, string tenant) {
            // deduce and apply state changes involved
            var shellState = _stateManager.GetShellState();
            foreach (var feature in descriptor.Features) {
                var featureName = feature.Name;
                var featureState = shellState.Features.SingleOrDefault(f => f.Name == featureName);
                if (featureState == null) {
                    featureState = new ShellFeatureState {
                        Name = featureName
                    };
                    shellState.Features = shellState.Features.Concat(new[] { featureState });
                }
                if (!featureState.IsInstalled) {
                    _stateManager.UpdateInstalledState(featureState, ShellFeatureState.State.Rising);
                }
                if (!featureState.IsEnabled) {
                    _stateManager.UpdateEnabledState(featureState, ShellFeatureState.State.Rising);
                }
            }
            foreach (var featureState in shellState.Features) {
                var featureName = featureState.Name;
                if (descriptor.Features.Any(f => f.Name == featureName)) {
                    continue;
                }
                if (!featureState.IsDisabled) {
                    _stateManager.UpdateEnabledState(featureState, ShellFeatureState.State.Falling);
                }
            }

            FireApplyChangesIfNeeded();
        }
开发者ID:anycall,项目名称:Orchard,代码行数:31,代码来源:ShellStateCoordinator.cs

示例3: Store

        public void Store(string name, ShellDescriptor descriptor) {
            if (Disabled) {
                return;
            }

            lock (_synLock) {
                VerifyCacheFile();
                var text = _appDataFolder.ReadFile(DescriptorCacheFileName);
                bool tenantCacheUpdated = false;
                var saveWriter = new StringWriter();
                var xmlDocument = new XmlDocument();
                xmlDocument.LoadXml(text);
                XmlNode rootNode = xmlDocument.DocumentElement;
                if (rootNode != null) {
                    foreach (XmlNode tenantNode in rootNode.ChildNodes) {
                        if (String.Equals(tenantNode.Name, name, StringComparison.OrdinalIgnoreCase)) {
                            tenantNode.InnerText = GetCacheTextForShellDescriptor(descriptor);
                            tenantCacheUpdated = true;
                            break;
                        }
                    }
                    if (!tenantCacheUpdated) {
                        XmlElement newTenant = xmlDocument.CreateElement(name);
                        newTenant.InnerText = GetCacheTextForShellDescriptor(descriptor);
                        rootNode.AppendChild(newTenant);
                    }
                }

                xmlDocument.Save(saveWriter);
                _appDataFolder.CreateFile(DescriptorCacheFileName, saveWriter.ToString());
            }
        }
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:32,代码来源:ShellDescriptorCache.cs

示例4: FeatureCommands

 public FeatureCommands(IModuleService moduleService, INotifier notifier, IFeatureManager featureManager, ShellDescriptor shellDescriptor)
 {
     _moduleService = moduleService;
     _notifier = notifier;
     _featureManager = featureManager;
     _shellDescriptor = shellDescriptor;
 }
开发者ID:stack72,项目名称:GiveCamp-London,代码行数:7,代码来源:FeatureCommands.cs

示例5: 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

示例6: ShapePlacementParsingStrategy

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

示例7: ThemeCommands

 public ThemeCommands(IDataMigrationManager dataMigrationManager,
                      ISiteThemeService siteThemeService,
                      IExtensionManager extensionManager,
                      ShellDescriptor shellDescriptor,
                      IThemeService themeService) {
     _dataMigrationManager = dataMigrationManager;
     _siteThemeService = siteThemeService;
     _extensionManager = extensionManager;
     _shellDescriptor = shellDescriptor;
     _themeService = themeService;
 }
开发者ID:RasterImage,项目名称:Orchard,代码行数:11,代码来源:ThemeCommands.cs

示例8: ShapePlacementParsingStrategy

 public ShapePlacementParsingStrategy(
     IExtensionManager extensionManager,
     ShellDescriptor shellDescriptor,
     IPlacementFileParser placementFileParser,
     IEnumerable<IPlacementPredicateProvider> predicateBuilders,
     IPlacementAlterationProvider alterationBuilder) {
     _extensionManager = extensionManager;
     _shellDescriptor = shellDescriptor;
     _placementFileParser = placementFileParser;
     _predicateBuilders = predicateBuilders;
     _alterationBuilder = alterationBuilder;
 }
开发者ID:akhurst,项目名称:ricealumni,代码行数:12,代码来源:ShapePlacementParsingStrategy.cs

示例9:

        string IProcessingEngine.AddTask(ShellSettings shellSettings, ShellDescriptor shellDescriptor, string messageName, Dictionary<string, object> parameters)
        {
            _addedTasks.Add(new ProcessingEngineTask
                {
                    ShellSettings = shellSettings,
                    ShellDescriptor = shellDescriptor,
                    MessageName = messageName,
                    Parameters = parameters
                });

            // As in DefaultProcessingEngine.
            return Guid.NewGuid().ToString("n");
        }
开发者ID:aholik,项目名称:orchardapphost,代码行数:13,代码来源:ProcessingEngineTaskAddedHandler.cs

示例10: ThemeAwareViewEngine

        public ThemeAwareViewEngine(
            WorkContext workContext,
            IEnumerable<IViewEngineProvider> viewEngineProviders,
            IConfiguredEnginesCache configuredEnginesCache,
            IExtensionManager extensionManager,
            ShellDescriptor shellDescriptor) {
            _workContext = workContext;
            _viewEngineProviders = viewEngineProviders;
            _configuredEnginesCache = configuredEnginesCache;
            _extensionManager = extensionManager;
            _shellDescriptor = shellDescriptor;

            Logger = NullLogger.Instance;
        }
开发者ID:SunRobin2015,项目名称:RobinWithOrchard,代码行数:14,代码来源:ThemeAwareViewEngine.cs

示例11: AdminController

        public AdminController(
            IOrchardServices orchardServices,
            ISettingsService settingsService,
            IExtensionManager extensionManager,
            ShellDescriptor shellDescriptor,
            IEnumerable<IThemeSelectionRule> rules) {

            Services = orchardServices;
            _settingsService = settingsService;
            _extensionManager = extensionManager;
            _shellDescriptor = shellDescriptor;
            _rules = rules;
            T = NullLocalizer.Instance;
        }
开发者ID:hqmirror,项目名称:Vandelay.Industries,代码行数:14,代码来源:AdminController.cs

示例12: AdminController

        public AdminController(
            IEnumerable<Orchard.Modules.Events.IExtensionDisplayEventHandler> extensionDisplayEventHandlers,
            IOrchardServices services,
            IModuleService moduleService,
            IDataMigrationManager dataMigrationManager,
            IReportsCoordinator reportsCoordinator,
            IExtensionManager extensionManager,
            IFeatureManager featureManager,
            IRecipeHarvester recipeHarvester,
            IRecipeManager recipeManager,
            ShellDescriptor shellDescriptor,
            ShellSettings shellSettings,
            IShapeFactory shapeFactory,
            IPackageService packageService,
            IMimeTypeProvider mimeTypeProvider,
            ISiteThemeService siteThemeService,
            IThemeService themeService)
        {
            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;
            _packageService = packageService;
            _mimeTypeProvider = mimeTypeProvider;

            _siteThemeService = siteThemeService;
            _themeService = themeService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;

            _tempPackageStoragePath = new Lazy<string>(() =>
            {
                var path = HostingEnvironment.MapPath("~/App_Data/Packages");
                if (!Directory.Exists(path))
                {
                    Directory.CreateDirectory(path);
                }
                return path;
            });
        }
开发者ID:SmartFire,项目名称:Orchard.Platform-Modules,代码行数:49,代码来源:AdminController.cs

示例13: GetShellDescriptor

        public ShellDescriptor GetShellDescriptor()
        {
            var shellDescriptor = ShellDescriptor;

            if (shellDescriptor == null)
            {
                var defaultShellDescriptor = _defaultTransientShellDescriptorProvider.GetDefaultShellDescriptor();
                if (defaultShellDescriptor != null)
                {
                    shellDescriptor = ShellDescriptor = defaultShellDescriptor;
                }
            }

            return shellDescriptor;
        }
开发者ID:aholik,项目名称:orchardapphost,代码行数:15,代码来源:TransientShellDescriptorManager.cs

示例14: CreateDescribedContext

        public ShellContext CreateDescribedContext(ShellSettings settings, ShellDescriptor shellDescriptor)
        {
            Logger.Debug("Creating described context for tenant {0}", settings.Name);

            var blueprint = _compositionStrategy.Compose(settings, shellDescriptor);
            var shellScope = _shellContainerFactory.CreateContainer(settings, blueprint);

            return new ShellContext
            {
                Settings = settings,
                Descriptor = shellDescriptor,
                Blueprint = blueprint,
                LifetimeScope = shellScope,
                Shell = shellScope.Resolve<IOrchardShell>()
            };
        }
开发者ID:qhme,项目名称:OrchardLite,代码行数:16,代码来源:ShellContextFactory.cs

示例15: AddTask

        public string AddTask(ShellSettings shellSettings, ShellDescriptor shellDescriptor, string eventName, Dictionary<string, object> parameters) {

            var entry = new Entry {
                ShellSettings = shellSettings,
                ShellDescriptor = shellDescriptor,
                MessageName = eventName,
                EventData = parameters,
                TaskId = Guid.NewGuid().ToString("n"),
                ProcessId = Guid.NewGuid().ToString("n"),
            };
            Logger.Information("Adding event {0} to process {1} for shell {2}",
                eventName,
                entry.ProcessId,
                shellSettings.Name);
            _entries.GetState().Add(entry);
            return entry.ProcessId;
        }
开发者ID:Higea,项目名称:Orchard,代码行数:17,代码来源:DefaultProcessingEngine.cs


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