public PSWorkflowRuntime() { this._syncObject = new object(); this._configuration = new PSWorkflowConfigurationProvider(); this._configuration.Runtime = this; PSCounterSetRegistrar pSCounterSetRegistrar = new PSCounterSetRegistrar(PSWorkflowPerformanceCounterSetInfo.ProviderId, PSWorkflowPerformanceCounterSetInfo.CounterSetId, PSWorkflowPerformanceCounterSetInfo.CounterSetType, PSWorkflowPerformanceCounterSetInfo.CounterInfoArray, null); PSWorkflowRuntime._psPerfCountersMgrInst.AddCounterSetInstance(pSCounterSetRegistrar); PSModuleInfo.UseAppDomainLevelModuleCache = true; }
/// <summary> /// Default constructor /// </summary> public PSWorkflowRuntime() { _configuration = new PSWorkflowConfigurationProvider(); _configuration.Runtime = this; PSCounterSetRegistrar registrar = new PSCounterSetRegistrar( PSWorkflowPerformanceCounterSetInfo.ProviderId, PSWorkflowPerformanceCounterSetInfo.CounterSetId, PSWorkflowPerformanceCounterSetInfo.CounterSetType, PSWorkflowPerformanceCounterSetInfo.CounterInfoArray); _psPerfCountersMgrInst.AddCounterSetInstance(registrar); // Enable caching module paths appdomain-wide. System.Management.Automation.PSModuleInfo.UseAppDomainLevelModuleCache = true; }