Пример #1
0
        public ApplicationContext(Core.ApplicationContext settings)
        {
            if (settings != null)
            {
                var linuxApplicationSettings = settings as ApplicationContext;

                if (linuxApplicationSettings != null)
                {
                    Initialize(linuxApplicationSettings);
                }
                else
                {
                    var windowsFormsApplicationSettings = settings as WindowsForms.ApplicationContext;

                    if (windowsFormsApplicationSettings != null)
                    {
                        Initialize(windowsFormsApplicationSettings);
                    }
                    else
                    {
                        Initialize(settings);
                    }
                }
            }
            else
            {
                Initialize();
            }
        }
Пример #2
0
        public void OnApplicationStarting(UmbracoApplication httpApplication, Core.ApplicationContext applicationContext)
        {
            // time to setup the tasks

            // these are the legacy tasks
            // just copied over here for backward compatibility
            // of course we should have a proper scheduler, see #U4-809

            // ping/keepalive
            pingTimer = new Timer(new TimerCallback(global::umbraco.presentation.keepAliveService.PingUmbraco), httpApplication.Context, 60000, 300000);

            // (un)publishing _and_ also run scheduled tasks (!)
            publishingTimer = new Timer(new TimerCallback(global::umbraco.presentation.publishingService.CheckPublishing), httpApplication.Context, 30000, 60000);

            // log scrubbing
            AddTask(LOG_SCRUBBER_TASK_NAME, GetLogScrubbingInterval());
        }
Пример #3
0
 public void OnApplicationStarted(UmbracoApplication httpApplication, Core.ApplicationContext applicationContext)
 {
     // nothing
 }
Пример #4
0
 public void OnApplicationInitialized(UmbracoApplication httpApplication, Core.ApplicationContext applicationContext)
 {
     // nothing yet
 }
Пример #5
0
        /// <summary>
        /// Initializes the specified settings.
        /// </summary>
        /// <param name="settings">The settings.</param>
        protected override void Initialize(Core.ApplicationContext settings)
        {
            base.Initialize(settings);

            InitializeSelf(null);
        }
Пример #6
0
 public static void RunApplication(Core.ApplicationContext settings)
 {
     Application.Run(new ApplicationContext(settings));
 }