예제 #1
0
        public CommandHostAgent(IOrchardHost orchardHost,
            IShellSettingsManager shellSettingsManager)
        {
            _orchardHost = orchardHost;
            _shellSettingsManager = shellSettingsManager;

            T = NullLocalizer.Instance;
        }
예제 #2
0
 public OrchardContainerMiddleware(
     RequestDelegate next,
     IShellSettingsManager shellSettingsManager,
     IOrchardHost orchardHost) {
     _next = next;
     _shellSettingsManager = shellSettingsManager;
     _orchardHost = orchardHost;
 }
예제 #3
0
        protected void Application_Start() {
            _hostContainer = OrchardStarter.CreateHostContainer(MvcSingletons);
            _host = _hostContainer.Resolve<IOrchardHost>();
            _host.Initialize();

            var route = RouteTable.Routes.MapRoute("foo", "hello-world", new { controller = "Home", action = "Index" });
            route.RouteHandler = new HelloYetAgainHandler();
        }
 public RecipeExecutor(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     Work<IImportExportService> importExportServiceWork)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _importExportServiceWork = importExportServiceWork;
 }
 public OrchardContainerMiddleware(
     RequestDelegate next,
     IShellSettingsManager shellSettingsManager,
     IOrchardHost orchardHost,
     ILoggerFactory loggerFactory) {
     _next = next;
     _shellSettingsManager = shellSettingsManager;
     _orchardHost = orchardHost;
     _logger = loggerFactory.CreateLogger<OrchardContainerMiddleware>();
 }
예제 #6
0
 public OrchardContainerMiddleware(
     RequestDelegate next,
     IOrchardHost orchardHost,
     IRunningShellTable runningShellTable,
     ILoggerFactory loggerFactory) {
     _next = next;
     _orchardHost = orchardHost;
     _runningShellTable = runningShellTable;
     _logger = loggerFactory.CreateLogger<OrchardContainerMiddleware>();
 }
예제 #7
0
        protected void Application_Start() {
            RegisterRoutes(RouteTable.Routes);
            _container = OrchardStarter.CreateHostContainer(MvcSingletons);
            _host = _container.Resolve<IOrchardHost>();

            _host.Initialize();

            // initialize shells to speed up the first dynamic query
            _host.BeginRequest();
            _host.EndRequest();
        }
예제 #8
0
 public SetupService(
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor)
 {
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     _extensionManager = extensionManager;
     _httpContextAccessor = httpContextAccessor;
 }
예제 #9
0
        protected void Application_Start() {
            // This is temporary until MVC2 is officially released.
            // We want to avoid running against an outdated preview installed in the GAC
            CheckMvcVersion(
                new Version("2.0.50217.0")/*MVC2 RTM file version #*/,
                new Version("2.0.50129.0")/*MVC2 RC2 file version #*/,
                new Version("2.0.41211.0")/*MVC2 RC file version #*/);

            RegisterRoutes(RouteTable.Routes);

            _host = OrchardStarter.CreateHost(MvcSingletons);
            _host.Initialize();

            //TODO: what's the failed initialization story - IoC failure in app start can leave you with a zombie appdomain
        }
예제 #10
0
 public SetupService(
     ShellSettings shellSettings,
     INotifier notifier,
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     T = NullLocalizer.Instance;
 }
 public TenantWorkContextAccessor(
     IShellSettingsManager shellSettingsManager,
     IOrchardHost orchardHost,
     IShellContextFactory shellContextFactory,
     ShellSettings shellSettings,
     IWorkContextAccessor wca
    // UrlHelper urlHelper
     )
 {
     _shellSettingsManager = shellSettingsManager;
     _orchardHost = orchardHost;
     _shellContextFactory = shellContextFactory;
     _shellSettings = shellSettings;
     _wca = wca;
     //_urlHelper = urlHelper;
 }
예제 #12
0
 public BackgroundTaskService(
     IOrchardHost orchardHost,
     ShellSettings shellSettings,
     IApplicationLifetime applicationLifetime,
     IEnumerable<IBackgroundTask> tasks,
     ILogger<BackgroundTaskService> logger)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _applicationLifetime = applicationLifetime;
     _tasks = tasks.GroupBy(GetGroupName).ToDictionary(x => x.Key, x => x.Select(i => i));
     _states = tasks.ToDictionary(x => x, x => BackgroundTaskState.Stopped);
     _timers = _tasks.Keys.ToDictionary(x => x, x => new Timer(DoWork, x, Timeout.Infinite, Timeout.Infinite));
     _periods = _tasks.Keys.ToDictionary(x => x, x => TimeSpan.FromMinutes(1));
     Logger = logger;
 }
        public OrchardContainerMiddleware(
            RequestDelegate next,
            IShellSettingsManager shellSettingsManager,
            IOrchardHost orchardHost,
            IPackageAssemblyLookup packageAssemblyLookup,
            IAssemblyLoadContextAccessor assemblyLoadContextAccessor) {
            _next = next;
            _shellSettingsManager = shellSettingsManager;
            _orchardHost = orchardHost;
            _packageAssemblyLookup = packageAssemblyLookup;
            _assemblyLoadContextAccessor = assemblyLoadContextAccessor;

#if !(DNXCORE50)
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
#endif
        }
예제 #14
0
 public SetupService(
  ShellSettings shellSettings,
  IOrchardHost orchardHost,
  IShellSettingsManager shellSettingsManager,
  IShellContainerFactory shellContainerFactory,
  ICompositionStrategy compositionStrategy,
  IProcessingEngine processingEngine,
  IExtensionManager extensionManager)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     _processingEngine = processingEngine;
     _extensionManager = extensionManager;
 }
예제 #15
0
        protected void Application_Start() {

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
            RoleEnvironment.Changing += (sender, e) => {
                                            // If a configuration setting is changing
                                            if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange)) {
                                                // Set e.Cancel to true to restart this role instance
                                                e.Cancel = true;
                                            }
                                        };

            RegisterRoutes(RouteTable.Routes);

            _host = OrchardStarter.CreateHost(MvcSingletons);
            _host.Initialize();
        }
예제 #16
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     _extensionManager = extensionManager;
     _httpContextAccessor = httpContextAccessor;
     T = NullLocalizer.Instance;
 }
예제 #17
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy,
     IProcessingEngine processingEngine,
     IRecipeHarvester recipeHarvester) {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     _processingEngine = processingEngine;
     _recipeHarvester = recipeHarvester;
     _recipes = _recipeHarvester.HarvestRecipes("Orchard.Setup");
     T = NullLocalizer.Instance;
 }
예제 #18
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor,
     IRunningShellTable runningShellTable,
     ILogger <SetupService> logger)
 {
     _shellSettings         = shellSettings;
     _orchardHost           = orchardHost;
     _shellSettingsManager  = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy   = compositionStrategy;
     _extensionManager      = extensionManager;
     _httpContextAccessor   = httpContextAccessor;
     _runningShellTable     = runningShellTable;
     _logger = logger;
 }
예제 #19
0
 public RecipeExecutor(
     IEventBus eventBus,
     IRecipeStore recipeStore,
     IEnumerable <IRecipeParser> recipeParsers,
     IOptions <RecipeHarvestingOptions> recipeOptions,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     ILogger <RecipeExecutor> logger,
     IStringLocalizer <RecipeExecutor> localizer)
 {
     _orchardHost         = orchardHost;
     _shellSettings       = shellSettings;
     _applicationLifetime = applicationLifetime;
     _eventBus            = eventBus;
     _recipeStore         = recipeStore;
     _recipeParsers       = recipeParsers;
     _recipeOptions       = recipeOptions.Value;
     _logger = logger;
     T       = localizer;
 }
예제 #20
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellSettingsManager shellSettingsManager,
     IShellContainerFactory shellContainerFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor,
     IRunningShellTable runningShellTable,
     ILoggerFactory loggerFactory)
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellSettingsManager = shellSettingsManager;
     _shellContainerFactory = shellContainerFactory;
     _compositionStrategy = compositionStrategy;
     _extensionManager = extensionManager;
     _httpContextAccessor = httpContextAccessor;
     _runningShellTable = runningShellTable;
     _logger = loggerFactory.CreateLogger<SetupService>();
 }
예제 #21
0
 public RecipeExecutor(
     IEventBus eventBus,
     ISession session,
     IRecipeParser recipeParser,
     IOrchardFileSystem fileSystem,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     ILogger<RecipeExecutor> logger,
     IStringLocalizer<RecipeExecutor> localizer)
 {
     _orchardHost = orchardHost;
     _shellSettings = shellSettings;
     _applicationLifetime = applicationLifetime;
     _eventBus = eventBus;
     _session = session;
     _recipeParser = recipeParser;
     _fileSystem = fileSystem;
     _logger = logger;
     T = localizer;
 }
예제 #22
0
 public RecipeExecutor(
     IEventBus eventBus,
     ISession session,
     IRecipeParser recipeParser,
     IOrchardFileSystem fileSystem,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     ILogger <RecipeExecutor> logger,
     IStringLocalizer <RecipeExecutor> localizer)
 {
     _orchardHost         = orchardHost;
     _shellSettings       = shellSettings;
     _applicationLifetime = applicationLifetime;
     _eventBus            = eventBus;
     _session             = session;
     _recipeParser        = recipeParser;
     _fileSystem          = fileSystem;
     _logger = logger;
     T       = localizer;
 }
        public OrchardContainerMiddleware(
            RequestDelegate next,
            IShellSettingsManager shellSettingsManager,
            IOrchardHost orchardHost,
            IAssemblyLoadContextAccessor assemblyLoadContextAccessor,
            IApplicationEnvironment applicationEnvironement,
            IOrchardLibraryManager libraryManager,
            ICache cache,
            ILoggerFactory loggerFactory) {
            _next = next;
            _shellSettingsManager = shellSettingsManager;
            _orchardHost = orchardHost;
            _assemblyLoadContextAccessor = assemblyLoadContextAccessor;
            _applicationEnvironement = applicationEnvironement;
            _libraryManager = libraryManager;
            _cache = cache;
            _logger = loggerFactory.CreateLogger<OrchardContainerMiddleware>();

#if !(DNXCORE50)
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
#endif
        }
예제 #24
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellContextFactory shellContextFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor,
     IRunningShellTable runningShellTable,
     IRecipeHarvester recipeHarvester,
     ILogger<SetupService> logger
     )
 {
     _shellSettings = shellSettings;
     _orchardHost = orchardHost;
     _shellContextFactory = shellContextFactory;
     _compositionStrategy = compositionStrategy;
     _extensionManager = extensionManager;
     _httpContextAccessor = httpContextAccessor;
     _runningShellTable = runningShellTable;
     _recipeHarvester = recipeHarvester;
     _logger = logger;
 }
        public OrchardContainerMiddleware(
            RequestDelegate next,
            IShellSettingsManager shellSettingsManager,
            IOrchardHost orchardHost,
            IAssemblyLoadContextAccessor assemblyLoadContextAccessor,
            IApplicationEnvironment applicationEnvironement,
            IOrchardLibraryManager libraryManager,
            ICache cache,
            ILoggerFactory loggerFactory)
        {
            _next = next;
            _shellSettingsManager        = shellSettingsManager;
            _orchardHost                 = orchardHost;
            _assemblyLoadContextAccessor = assemblyLoadContextAccessor;
            _applicationEnvironement     = applicationEnvironement;
            _libraryManager              = libraryManager;
            _cache  = cache;
            _logger = loggerFactory.CreateLogger <OrchardContainerMiddleware>();

#if !(DNXCORE50)
            AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
#endif
        }
예제 #26
0
        protected void Application_Start()
        {
            CloudStorageAccount.SetConfigurationSettingPublisher(
                (configName, configSetter) =>
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName))
                );

            // For information on handling configuration changes
            // see the MSDN topic at http://go.microsoft.com/fwlink/?LinkId=166357.
            RoleEnvironment.Changing += (sender, e) => {
                // If a configuration setting is changing
                if (e.Changes.Any(change => change is RoleEnvironmentConfigurationSettingChange))
                {
                    // Set e.Cancel to true to restart this role instance
                    e.Cancel = true;
                }
            };

            RegisterRoutes(RouteTable.Routes);

            _host = OrchardStarter.CreateHost(MvcSingletons);
            _host.Initialize();
        }
예제 #27
0
 public RecipeExecutor(
     IEventBus eventBus,
     ISession session,
     IEnumerable<IRecipeParser> recipeParsers,
     IOptions<RecipeHarvestingOptions> recipeOptions,
     IOrchardFileSystem fileSystem,
     IApplicationLifetime applicationLifetime,
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     ILogger<RecipeExecutor> logger,
     IStringLocalizer<RecipeExecutor> localizer)
 {
     _orchardHost = orchardHost;
     _shellSettings = shellSettings;
     _applicationLifetime = applicationLifetime;
     _eventBus = eventBus;
     _session = session;
     _recipeParsers = recipeParsers;
     _recipeOptions = recipeOptions.Value;
     _fileSystem = fileSystem;
     _logger = logger;
     T = localizer;
 }
예제 #28
0
        public CacheFileService(
            IOrchardHost orchardHost,
            IStorageProvider storageProvider,
            IRepository <CombinedFileRecord> fileRepository,
            ICombinatorResourceManager combinatorResourceManager,
            UrlHelper urlHelper,
            IClock clock,
            ISessionLocator sessionLocator,
            ICombinatorEventHandler combinatorEventHandler,
            ICacheService cacheService,
            ICombinatorEventMonitor combinatorEventMonitor)
        {
            _orchardHost               = orchardHost;
            _storageProvider           = storageProvider;
            _fileRepository            = fileRepository;
            _combinatorResourceManager = combinatorResourceManager;
            _urlHelper              = urlHelper;
            _clock                  = clock;
            _sessionLocator         = sessionLocator;
            _combinatorEventHandler = combinatorEventHandler;

            _cacheService           = cacheService;
            _combinatorEventMonitor = combinatorEventMonitor;
        }
예제 #29
0
 public SetupService(
     ShellSettings shellSettings,
     IOrchardHost orchardHost,
     IShellContextFactory shellContextFactory,
     ICompositionStrategy compositionStrategy,
     IExtensionManager extensionManager,
     IHttpContextAccessor httpContextAccessor,
     IRunningShellTable runningShellTable,
     IRecipeHarvester recipeHarvester,
     ILogger <SetupService> logger,
     IStringLocalizer <SetupService> stringLocalizer
     )
 {
     _shellSettings       = shellSettings;
     _orchardHost         = orchardHost;
     _shellContextFactory = shellContextFactory;
     _compositionStrategy = compositionStrategy;
     _extensionManager    = extensionManager;
     _httpContextAccessor = httpContextAccessor;
     _runningShellTable   = runningShellTable;
     _recipeHarvester     = recipeHarvester;
     _logger = logger;
     T       = stringLocalizer;
 }
예제 #30
0
        public CacheFileService(
            IOrchardHost orchardHost,
            IStorageProvider storageProvider,
            IRepository<CombinedFileRecord> fileRepository,
            ICombinatorResourceManager combinatorResourceManager,
            UrlHelper urlHelper,
            IClock clock,
            ISessionLocator sessionLocator,
            ICombinatorEventHandler combinatorEventHandler,
            ICacheService cacheService,
            ICombinatorEventMonitor combinatorEventMonitor)
        {
            _orchardHost = orchardHost;
            _storageProvider = storageProvider;
            _fileRepository = fileRepository;
            _combinatorResourceManager = combinatorResourceManager;
            _urlHelper = urlHelper;
            _clock = clock;
            _sessionLocator = sessionLocator;
            _combinatorEventHandler = combinatorEventHandler;

            _cacheService = cacheService;
            _combinatorEventMonitor = combinatorEventMonitor;
        }
 public static IOrchardShell CreateShell_Obsolete(this IOrchardHost host)
 {
     return(host.CreateShellContainer_Obsolete().Resolve <IOrchardShell>());
 }
 public MaintenanceBanner(ShellSettings shellSettings, IOrchardServices orchardServices, IShellSettingsManager shellSettingsManager, IOrchardHost orchardHost)
 {
     _shellSettings        = shellSettings;
     _orchardServices      = orchardServices;
     _shellSettingsManager = shellSettingsManager;
     _orchardHost          = orchardHost;
     T = NullLocalizer.Instance;
 }
예제 #33
0
 private static void HostEndRequest(HttpApplication application, IOrchardHost host)
 {
     host.EndRequest();
 }
예제 #34
0
 private static void HostBeginRequest(HttpApplication application, IOrchardHost host)
 {
     application.Context.Items["originalHttpContext"] = application.Context;
     host.BeginRequest();
 }
예제 #35
0
 public ContainerModule(IOrchardHost orchardHost)
 {
     this.orchardHost = orchardHost;
 }
 public ContainerModule(IOrchardHost orchardHost)
 {
     this.orchardHost = orchardHost;
 }
 public TestMiddleware(RequestDelegate next, IOrchardHost orchardHost)
 {
     _next        = next;
     _orchardHost = orchardHost;
 }
예제 #38
0
파일: Global.asax.cs 프로젝트: dioptre/nkd
 private static void HostEndRequest(HttpApplication application, IOrchardHost host) {
     host.EndRequest();
 }
예제 #39
0
        public void Configure(IApplicationBuilder builder, ILoggerFactory loggerFactory, IOrchardHost orchardHost) {
            builder.ConfigureWebHost(loggerFactory);

            orchardHost.Initialize();
        }
예제 #40
0
파일: Startup.cs 프로젝트: nicklv/Orchard2
        public void Configure(IApplicationBuilder builder, ILoggerFactory loggerFactory, IOrchardHost orchardHost)
        {
            builder.ConfigureWebHost(loggerFactory);

            orchardHost.Initialize();
        }
 public DeferredTaskMiddleware(RequestDelegate next, IOrchardHost orchardHost)
 {
     _next        = next;
     _orchardHost = orchardHost;
 }
예제 #42
0
파일: Global.asax.cs 프로젝트: dioptre/nkd
 private static void HostBeginRequest(HttpApplication application, IOrchardHost host) {
     application.Context.Items["originalHttpContext"] = application.Context;
     host.BeginRequest();
 }