public static void LogMessage <T>(T message)
        {
            GlimpseRuntime runtime = GlimpseManager.GetRuntime();

            if (runtime == null || runtime.IsInitialized == false)
            {
                return;
            }

            if (runtime.Configuration == null || runtime.Configuration.MessageBroker == null)
            {
                return;
            }

            var messageBroker = runtime.Configuration.MessageBroker;

            messageBroker.Publish(message);
        }
        public static bool IsGlimpseActive()
        {
            GlimpseRuntime runtime = GlimpseManager.GetRuntime();

            if (runtime == null || runtime.IsInitialized == false)
            {
                return(false);
            }

            if (HttpContext.Current.Items.Contains(GlimpseItemKey) == false)
            {
                return(false);
            }

            var runtimePolicy = (RuntimePolicy)HttpContext.Current.Items["__GlimpseRequestRuntimePermissions"];

            return(runtimePolicy == RuntimePolicy.On);
        }