Esempio n. 1
0
        public CommandHostAgent(IOrchardHost orchardHost,
            IShellSettingsManager shellSettingsManager)
        {
            _orchardHost = orchardHost;
            _shellSettingsManager = shellSettingsManager;

            T = NullLocalizer.Instance;
        }
 public OrchardContainerMiddleware(
     RequestDelegate next,
     IShellSettingsManager shellSettingsManager,
     IOrchardHost orchardHost) {
     _next = next;
     _shellSettingsManager = shellSettingsManager;
     _orchardHost = orchardHost;
 }
Esempio n. 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>();
 }
 public OrchardContainerMiddleware(
     RequestDelegate next,
     IOrchardHost orchardHost,
     IRunningShellTable runningShellTable,
     ILoggerFactory loggerFactory) {
     _next = next;
     _orchardHost = orchardHost;
     _runningShellTable = runningShellTable;
     _logger = loggerFactory.CreateLogger<OrchardContainerMiddleware>();
 }
        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();
        }
Esempio n. 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;
 }
Esempio n. 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
        }
Esempio n. 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;
 }
Esempio n. 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
        }
Esempio n. 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;
 }
Esempio n. 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();
        }
Esempio n. 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;
 }
 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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>();
 }
Esempio n. 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;
 }
Esempio n. 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
        }
Esempio n. 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
        }
Esempio n. 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();
        }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 33
0
 private static void HostEndRequest(HttpApplication application, IOrchardHost host)
 {
     host.EndRequest();
 }
Esempio n. 34
0
 private static void HostBeginRequest(HttpApplication application, IOrchardHost host)
 {
     application.Context.Items["originalHttpContext"] = application.Context;
     host.BeginRequest();
 }
Esempio n. 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;
 }
Esempio n. 38
0
 private static void HostEndRequest(HttpApplication application, IOrchardHost host) {
     host.EndRequest();
 }
Esempio n. 39
0
        public void Configure(IApplicationBuilder builder, ILoggerFactory loggerFactory, IOrchardHost orchardHost) {
            builder.ConfigureWebHost(loggerFactory);

            orchardHost.Initialize();
        }
Esempio n. 40
0
        public void Configure(IApplicationBuilder builder, ILoggerFactory loggerFactory, IOrchardHost orchardHost)
        {
            builder.ConfigureWebHost(loggerFactory);

            orchardHost.Initialize();
        }
 public DeferredTaskMiddleware(RequestDelegate next, IOrchardHost orchardHost)
 {
     _next        = next;
     _orchardHost = orchardHost;
 }
Esempio n. 42
0
 private static void HostBeginRequest(HttpApplication application, IOrchardHost host) {
     application.Context.Items["originalHttpContext"] = application.Context;
     host.BeginRequest();
 }