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; }