Пример #1
0
 void InitializeInstancePerfCounterSettings(FlowThrottle instanceContextsFt)
 {
     Fx.Assert(instanceContextsFt != null, "Expect instanceContext to be initialized");
     Fx.Assert(this.servicePerformanceCounters != null, "expect servicePerformanceCounters to be set");
     instanceContextsFt.SetAcquired(this.AcquiredInstancesToken);
     instanceContextsFt.SetReleased(this.ReleasedInstancesToken);
     instanceContextsFt.SetRatio(this.RatioInstancesToken);
     this.servicePerformanceCounters.SetThrottleBase((int)ServicePerformanceCounters.PerfCounters.InstancesPercentMaxInstancesBase, instanceContextsFt.Capacity);
 }
 void InitializeInstancePerfCounterSettings(FlowThrottle instanceContextsFt)
 {
     Fx.Assert(instanceContextsFt != null, "Expect instanceContext to be initialized");
     Fx.Assert(this.servicePerformanceCounters != null, "expect servicePerformanceCounters to be set");
     instanceContextsFt.SetAcquired(this.AcquiredInstancesToken);
     instanceContextsFt.SetReleased(this.ReleasedInstancesToken);
     instanceContextsFt.SetRatio(this.RatioInstancesToken);
     this.servicePerformanceCounters.SetThrottleBase((int)ServicePerformanceCounters.PerfCounters.InstancesPercentMaxInstancesBase, instanceContextsFt.Capacity);
 }