Exemplo n.º 1
0
        public virtual void Dispose()
        {
            if (_generator != null)
            {
                _generator.Dispose();
                Console.WriteLine("A total of {0} events have been logged", _generator.Count);
            }

            _taskScheduler.Dispose();
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            // These objects shall be kept alive at least until this method is called!
            // DO NOT REMOVE THE FOLLOWING CODE
            GC.KeepAlive(_interfaces);
            GC.KeepAlive(_files);
            GC.KeepAlive(_shell);
            GC.KeepAlive(_services);
            GC.KeepAlive(_processes);
            GC.KeepAlive(_network);
            GC.KeepAlive(_registry);

            _socket?.Dispose();
            _taskScheduler?.Dispose();
        }
Exemplo n.º 3
0
        private void RunReservoir(IReservoir reservoir)
        {
            var scheduler = new DefaultTaskScheduler();

            scheduler.Interval(
                TimeSpan.FromMilliseconds(20),
                TaskCreationOptions.None,
                () =>
            {
                reservoir.GetSnapshot();
                reservoir.Reset();
            });

            SimpleBenchmarkRunner.Run(
                () => { reservoir.Update(_fixture.Rnd.Next(0, 1000), _fixture.RandomUserValue); });

            scheduler.Dispose();
        }
Exemplo n.º 4
0
 public void TestFixtureTearDown()
 {
     _scheduler.Dispose();
 }
Exemplo n.º 5
0
 public void TearDown()
 {
     _taskScheduler.Dispose();
 }
Exemplo n.º 6
0
 public void TearDown()
 {
     _scheduler.Dispose();
 }