コード例 #1
0
ファイル: HttpModule.cs プロジェクト: rroman81/Glimpse
        internal IGlimpseRuntime GetRuntime(HttpApplicationStateBase applicationState)
        {
            var runtime = applicationState[Constants.RuntimeKey] as IGlimpseRuntime;

            if (runtime == null)
            {
                lock (LockObj)
                {
                    runtime = applicationState[Constants.RuntimeKey] as IGlimpseRuntime;

                    if (runtime == null)
                    {
                        runtime = Factory.InstantiateRuntime();

                        applicationState.Add(Constants.RuntimeKey, runtime);
                    }
                }
            }

            return runtime;
        }