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(); }
protected virtual void Dispose(bool disposing) { if (!disposing) { return; } _counters.Dispose(); _persistence.Dispose(); }
protected virtual void Dispose(bool disposing) { if (!disposing || _disposed) { return; } Logger.Debug(Resources.ShuttingDownDispatchScheduler); _disposed = true; _dispatcher.Dispose(); _persistence.Dispose(); }
protected virtual void Dispose(bool disposing) { if (!disposing) { return; } Logger.Info(Resources.ShuttingDownStore); _persistence.Dispose(); foreach (var hook in _pipelineHooks) { hook.Dispose(); } }
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(); } } }
public void Dispose() { _original.Dispose(); }
public void should_dispose_the_underlying_persistence_infrastructure_exactly_once() { A.CallTo(() => _persistStreams.Dispose()).MustHaveHappened(Repeated.Exactly.Once); }
public void Dispose() { underlying.Dispose(); }
protected override void Cleanup() { _process1.Drop(); _process1.Dispose(); _process2.Dispose(); }