當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。