示例#1
0
 public WebInitializer(IDbContextFactory factory, IWebServerStartup webServerStartup, IShutdownHandler shutdownHandler)
 {
     _factory          = factory;
     _webServerStartup = webServerStartup;
     _shutdownHandler  = shutdownHandler;
     _cts = new CancellationTokenSource();
 }
        void IStartupModule.Startup(IStartupEngine engine)
        {
            _ShutdownHandler = engine.Locator.Get <IShutdownHandler>(); // cannot inject it, to avoid recursion

#if HAS_APP_DOMAIN
            System.AppDomain.CurrentDomain.DomainUnload -= (s, e) => CurrentDomain_DomainUnload();
            System.AppDomain.CurrentDomain.DomainUnload += (s, e) => CurrentDomain_DomainUnload();
#elif HAS_ASSEMBLY_LOAD_CONTEXT
            System.Runtime.Loader.AssemblyLoadContext.Default.Unloading -= (context) => CurrentDomain_DomainUnload();
            System.Runtime.Loader.AssemblyLoadContext.Default.Unloading += (context) => CurrentDomain_DomainUnload();
#endif
        }
示例#3
0
 public SoftwareUpdate(ISelfUpdater su, UserSettings settings, IDialogManager dialogManager,
                       IShutdownHandler shutdownHandler)
 {
     _dialogManager   = dialogManager;
     _shutdownHandler = shutdownHandler;
     _settings        = settings;
     SU             = su;
     _changelogURL  = new Uri(CommonUrls.MainUrl, "/changelog/nolayout");
     CurrentVersion = Common.App.ApplicationVersion;
     HandleIsNewVersionInstalled();
     IsNotInstalled = Common.Flags.SelfUpdateSupported && !SU.IsInstalled();
 }
 public PlayStartupManager(UserSettings settings, IShutdownHandler shutdownHandler,
     IFirstTimeLicense firstTimeLicense, ISystemInfo systemInfo, IUserSettingsStorage storage,
     ISoftwareUpdate softwareUpdate, Container container, ICacheManager cacheManager,
     Cache.ImageFileCache imageFileCache,
     IPreRequisitesInstaller prerequisitesInstaller, ContactList contactList,
     IContentManager contentManager, IDialogManager dialogManager,
     VersionRegistry versionRegistry, Lazy<IUpdateManager> updateManager)
     : base(systemInfo, cacheManager, dialogManager) {
     _settings = settings;
     _shutdownHandler = shutdownHandler;
     _firstTimeLicense = firstTimeLicense;
     _softwareUpdate = softwareUpdate;
     _container = container;
     _imageFileCache = imageFileCache;
     _prerequisitesInstaller = prerequisitesInstaller;
     _contactList = contactList;
     _contentManager = contentManager;
     _dialogManager = dialogManager;
     _versionRegistry = versionRegistry;
     _updateManager = updateManager;
     _systemInfo = systemInfo;
     _storage = storage;
 }
示例#5
0
 public PlayStartupManager(UserSettings settings, IShutdownHandler shutdownHandler,
                           IFirstTimeLicense firstTimeLicense, ISystemInfo systemInfo, IUserSettingsStorage storage,
                           ISoftwareUpdate softwareUpdate, Container container, ICacheManager cacheManager,
                           Cache.ImageFileCache imageFileCache,
                           IPreRequisitesInstaller prerequisitesInstaller, ContactList contactList,
                           IContentManager contentManager, IDialogManager dialogManager,
                           VersionRegistry versionRegistry, Lazy <IUpdateManager> updateManager, ISpecialDialogManager specialDialogManager)
     : base(cacheManager, dialogManager, specialDialogManager)
 {
     _settings               = settings;
     _shutdownHandler        = shutdownHandler;
     _firstTimeLicense       = firstTimeLicense;
     _softwareUpdate         = softwareUpdate;
     _container              = container;
     _imageFileCache         = imageFileCache;
     _prerequisitesInstaller = prerequisitesInstaller;
     _contactList            = contactList;
     _contentManager         = contentManager;
     _dialogManager          = dialogManager;
     _versionRegistry        = versionRegistry;
     _updateManager          = updateManager;
     _systemInfo             = systemInfo;
     _storage = storage;
 }
示例#6
0
 public GameLauncher(IShutdownHandler shutdownHandler, IRestarter restarter) {
     _shutdownHandler = shutdownHandler;
     _restarter = restarter;
 }
示例#7
0
 public Restarter(IShutdownHandler shutdownHandler, IDialogManager dialogManager) {
     _shutdownHandler = shutdownHandler;
     _dialogManager = dialogManager;
 }
 public void RegisterHandler(IShutdownHandler handler)
 {
     this.shutdownHandler.Add(handler);
 }
示例#9
0
 public TestFuncCreationComplex(IInjectable injectionTest, IStartupConfiguration configuration, IShutdownHandler shutdownHandler)
 {
     InjectionTest = injectionTest;
 }
 public WebInitializer(IDbContextFactory factory, IWebServerStartup webServerStartup, IShutdownHandler shutdownHandler) {
     _factory = factory;
     _webServerStartup = webServerStartup;
     _shutdownHandler = shutdownHandler;
     _cts = new CancellationTokenSource();
 }
示例#11
0
 public ShutdownCommandHandler(IShutdownHandler shutdownHandler, IContentInstallationService contentInstallation)
 {
     _shutdownHandler     = shutdownHandler;
     _contentInstallation = contentInstallation;
 }
示例#12
0
 public GameLauncher(IShutdownHandler shutdownHandler, IRestarter restarter)
 {
     _shutdownHandler = shutdownHandler;
     _restarter       = restarter;
 }
示例#13
0
 public Restarter(IShutdownHandler shutdownHandler, IDialogManager dialogManager)
 {
     _shutdownHandler = shutdownHandler;
     _dialogManager   = dialogManager;
 }
示例#14
0
 public ShutdownHandler(IShutdownHandler shutdownHandler)
 {
     _shutdownHandler = shutdownHandler;
 }
示例#15
0
 public void RegisterShutdownHandler(IShutdownHandler handler)
 {
     this.shutdownBroker.RegisterHandler(handler);
 }