示例#1
0
 /// <summary>
 /// Adds the sampler.
 /// </summary>
 /// <param name="sampler">The sampler.</param>
 public void AddSampler(ISampler sampler)
 {
     _samplers.Add(sampler);
     sampler.MonitoringSender = this;
     if (_stateMachine.CurrentState == MonitorStatus.Started)
     {
         sampler.Start();
     }
 }
示例#2
0
文件: Monitor.cs 项目: petxo/HermEsb
 /// <summary>
 /// Adds the sampler.
 /// </summary>
 /// <param name="sampler">The sampler.</param>
 public void AddSampler(ISampler sampler)
 {
     _samplers.Add(sampler);
     sampler.MonitoringSender = this;
     if (_stateMachine.CurrentState  == MonitorStatus.Started)
     {
         sampler.Start();
     }
 }