private void InitializeApplication(object sender, EventArgs args)
        {
            if (!(sender is HttpApplication app))
            {
                return;
            }

            // for *each* application (this will run more than once)
            app.BeginRequest += (s, a) => _profiler.UmbracoApplicationBeginRequest(s, a);
            app.EndRequest   += (s, a) => _profiler.UmbracoApplicationEndRequest(s, a);
        }
예제 #2
0
        private void InitializeApplication(object sender, EventArgs args)
        {
            if (!(sender is HttpApplication app))
            {
                return;
            }

            // for *each* application (this will run more than once)
            void beginRequest(object s, EventArgs a) => _profiler.UmbracoApplicationBeginRequest(s, a);

            app.BeginRequest += beginRequest;
            _terminate.Add(() => app.BeginRequest -= beginRequest);

            void endRequest(object s, EventArgs a) => _profiler.UmbracoApplicationEndRequest(s, a);

            app.EndRequest += endRequest;
            _terminate.Add(() => app.EndRequest -= endRequest);
        }
예제 #3
0
 private void EndRequest(object s, EventArgs a) => _profiler.UmbracoApplicationEndRequest(s, a);