static CodeGenerationManager()
        {
            string assemblyTempPath = null;

            try
            {
                assemblyTempPath = PathUtil.Resolve(GlobalSettingsFacade.GeneratedAssembliesDirectory);
            }
            catch
            {
                // NOTE: We don't want this static constructor fail if GlobalSettingsFacade failed to load.
            }

            if (assemblyTempPath != null)
            {
                if (!C1Directory.Exists(assemblyTempPath))
                {
                    C1Directory.CreateDirectory(assemblyTempPath);
                }
            }

            GlobalEventSystemFacade.SubscribeToFlushEvent(args => Flush());

            GlobalEventSystemFacade.SubscribeToShutDownEvent(args => ClearOldTempFiles());
        }
Esempio n. 2
0
        static BrowserRender()
        {
            GlobalEventSystemFacade.SubscribeToShutDownEvent(a => ShutdownPhantomJsExeSilent());
            PackageInstaller.OnPackageInstallation += ShutdownPhantomJsExeSilent;

            FileChangeNotificator.Subscribe(PhantomServer.ScriptFilePath, (a, b) => PhantomServer.ShutDown(false));
        }
Esempio n. 3
0
        static XmlDataProviderDocumentWriter()
        {
            _autoCommitTimer           = new System.Timers.Timer(_updateFrequency.TotalMilliseconds);
            _autoCommitTimer.AutoReset = true;
            _autoCommitTimer.Elapsed  += new System.Timers.ElapsedEventHandler(OnAutoCommitTimer);
            _autoCommitTimer.Start();

            GlobalEventSystemFacade.SubscribeToShutDownEvent(OnShutDownEvent);
        }
Esempio n. 4
0
 static WorkflowFacade()
 {
     GlobalEventSystemFacade.SubscribeToFlushEvent(OnFlushEvent);
     GlobalEventSystemFacade.SubscribeToShutDownEvent(OnShutDownEvent);
     ConsoleFacade.SubscribeToConsoleClosedEvent(OnConsoleClosedEvent);
 }
 static DisposableResourceTracer()
 {
     GlobalEventSystemFacade.SubscribeToShutDownEvent(OnShutDownEvent);
 }