コード例 #1
0
 public void Initialize(int pageSize)
 {
     if (_persistence != null && !_persistence.IsDisposed)
     {
         _persistence.Drop();
         _persistence.Dispose();
     }
     _persistence = new PerformanceCounterPersistenceEngine(_createPersistence(pageSize), "tests");
     _persistence.Initialize();
 }
        public void Initialize()
        {
            if (_persistence != null && !_persistence.IsDisposed)
            {
                _persistence.Drop();
                _persistence.Dispose();
            }
#if !NETSTANDARD2_0
            _persistence = new PerformanceCounterPersistenceEngine(_createPersistence(), "tests");
#else
            _persistence = _createPersistence();
#endif
            _persistence.Initialize();
        }
        public void Initialize()
        {
            if (_persistence?.IsDisposed == false)
            {
                _persistence.Drop();
                _persistence.Dispose();
            }
#if NET461
            _persistence = new PerformanceCounterPersistenceEngine(_createPersistence(), "tests");
#else
            _persistence = _createPersistence();
#endif
            _persistence.Initialize();
        }
コード例 #4
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            _counters.Dispose();
            _persistence.Dispose();
        }
コード例 #5
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing || _disposed)
            {
                return;
            }

            Logger.Debug(Resources.ShuttingDownDispatchScheduler);
            _disposed = true;
            _dispatcher.Dispose();
            _persistence.Dispose();
        }
コード例 #6
0
        protected virtual void Dispose(bool disposing)
        {
            if (!disposing)
            {
                return;
            }

            Logger.Info(Resources.ShuttingDownStore);
            _persistence.Dispose();
            foreach (var hook in _pipelineHooks)
            {
                hook.Dispose();
            }
        }
コード例 #7
0
        public void Dispose()
        {
            lock (subscriptionLock)
            {
                if (!isDisposed)
                {
                    isDisposed = true;

                    cancellationTokenSource.Cancel();

                    foreach (Subscription subscription in subscriptions.ToArray())
                    {
                        subscription.Complete();
                    }

                    Task loaderToWaitFor = Volatile.Read(ref currentLoader);
                    loaderToWaitFor?.Wait();

                    cancellationTokenSource.Dispose();
                    eventStore.Dispose();
                }
            }
        }
コード例 #8
0
 public void Dispose()
 {
     _original.Dispose();
 }
コード例 #9
0
 public void should_dispose_the_underlying_persistence_infrastructure_exactly_once()
 {
     A.CallTo(() => _persistStreams.Dispose()).MustHaveHappened(Repeated.Exactly.Once);
 }
 public void Dispose()
 {
     underlying.Dispose();
 }
コード例 #11
0
 protected override void Cleanup()
 {
     _process1.Drop();
     _process1.Dispose();
     _process2.Dispose();
 }