private HealthMonitoringSectionHelper() { try { this._section = RuntimeConfig.GetAppConfig().HealthMonitoring; } catch (Exception exception) { if (HttpRuntime.InitializationException == null) { HttpRuntime.InitializationException = exception; } this._section = RuntimeConfig.GetAppLKGConfig().HealthMonitoring; if (this._section == null) { throw; } } this._enabled = this._section.Enabled; if (this._enabled) { this.BasicSanityCheck(); this._ruleInfos = new ArrayList(); this._customEvaluatorInstances = new Hashtable(); this._providerInstances = new ProviderInstances(this._section); this._cachedMatchedRulesForCustomEvents = new Hashtable(new WebBaseEventKeyComparer()); _cachedMatchedRules = new ArrayList[WebEventCodes.GetEventArrayDimensionSize(0), WebEventCodes.GetEventArrayDimensionSize(1)]; this.BuildRuleInfos(); this._providerInstances.CleanupUninitProviders(); } }
private HealthMonitoringSectionHelper() { try { this._section = RuntimeConfig.GetAppConfig().HealthMonitoring; } catch (Exception exception) { if (HttpRuntime.InitializationException == null) { HttpRuntime.InitializationException = exception; } this._section = RuntimeConfig.GetAppLKGConfig().HealthMonitoring; if (this._section == null) { throw; } } this._enabled = this._section.Enabled; if (this._enabled) { this.BasicSanityCheck(); this._ruleInfos = new ArrayList(); this._customEvaluatorInstances = new Hashtable(); this._providerInstances = new ProviderInstances(this._section); this._cachedMatchedRulesForCustomEvents = new Hashtable(new WebBaseEventKeyComparer()); _cachedMatchedRules = new ArrayList[WebEventCodes.GetEventArrayDimensionSize(0), WebEventCodes.GetEventArrayDimensionSize(1)]; this.BuildRuleInfos(); this._providerInstances.CleanupUninitProviders(); } }
protected ITaskProvider GetTaskProvider(string editorKey) { var ret = default(ITaskProvider); ProviderInstances.TryGetValue(editorKey, out ret); if (ret != null) { ret.App = App; } return(ret); }
public override void Initialize(IApp app) { base.Initialize(app); Providers.ForEach(b => { var iface = default(Type); if ((iface = b.Type.GetInterface(typeof(ITaskProvider).FullName)) == null) { throw new ElideException("Task provider '{0}' doesn't implement ITaskProvider interface.", b.Type); } ProviderInstances.Add(b.EditorKey, TypeCreator.New <ITaskProvider>(b.Type)); }); }
HealthMonitoringSectionHelper() { // Handle config exceptions so we can still log messages to the event log. try { _section = RuntimeConfig.GetAppConfig().HealthMonitoring; } catch (Exception e) { // If InitializationException has not already been set, then this exception // is happening because the <healthMonitoring> section has an error. // By setting InitializationException, we allow the exception to be displayed in the response. // If InitializationException is already set, ignore this exception so we can // display the original in the response. if (HttpRuntime.InitializationException == null) { HttpRuntime.InitializationException = e; } _section = RuntimeConfig.GetAppLKGConfig().HealthMonitoring; // WOS 1965670: if we fail to get the section throw the previous error if (_section == null) { throw; } } _enabled = _section.Enabled; if (!_enabled) { return; } // First run some basic sanity check BasicSanityCheck(); // Init some class members _ruleInfos = new ArrayList(); _customEvaluatorInstances = new Hashtable(); _providerInstances = new ProviderInstances(_section); _cachedMatchedRulesForCustomEvents = new Hashtable(new WebBaseEventKeyComparer()); _cachedMatchedRules = new ArrayList[WebEventCodes.GetEventArrayDimensionSize(0), WebEventCodes.GetEventArrayDimensionSize(1)]; BuildRuleInfos(); _providerInstances.CleanupUninitProviders(); }
HealthMonitoringSectionHelper() { // Handle config exceptions so we can still log messages to the event log. try { _section = RuntimeConfig.GetAppConfig().HealthMonitoring; } catch(Exception e) { // If InitializationException has not already been set, then this exception // is happening because the <healthMonitoring> section has an error. // By setting InitializationException, we allow the exception to be displayed in the response. // If InitializationException is already set, ignore this exception so we can // display the original in the response. if (HttpRuntime.InitializationException == null) { HttpRuntime.InitializationException = e; } _section = RuntimeConfig.GetAppLKGConfig().HealthMonitoring; // WOS 1965670: if we fail to get the section throw the previous error if (_section == null) { throw; } } _enabled = _section.Enabled; if (!_enabled) { return; } // First run some basic sanity check BasicSanityCheck(); // Init some class members _ruleInfos = new ArrayList(); _customEvaluatorInstances = new Hashtable(); _providerInstances = new ProviderInstances(_section); _cachedMatchedRulesForCustomEvents = new Hashtable(new WebBaseEventKeyComparer()); _cachedMatchedRules = new ArrayList[WebEventCodes.GetEventArrayDimensionSize(0), WebEventCodes.GetEventArrayDimensionSize(1)]; BuildRuleInfos(); _providerInstances.CleanupUninitProviders(); }