Example #1
0
 public PSCounterSetRegistrar(PSCounterSetRegistrar srcPSCounterSetRegistrar) : base(srcPSCounterSetRegistrar)
 {
     if (srcPSCounterSetRegistrar == null)
     {
         throw new ArgumentNullException("srcPSCounterSetRegistrar");
     }
 }
Example #2
0
 public PSCounterSetRegistrar(PSCounterSetRegistrar srcPSCounterSetRegistrar) : base(srcPSCounterSetRegistrar)
 {
     if (srcPSCounterSetRegistrar == null)
     {
         throw new ArgumentNullException("srcPSCounterSetRegistrar");
     }
 }
Example #3
0
        /// <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;
        }
Example #4
0
		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;
		}