コード例 #1
0
        public void Stop(int?maxGenerationToReap)
        {
            if (_interval == Timeout.InfiniteTimeSpan || !IsRunning)
            {
                return;
            }

            _maintenanceThread = null;

            _maintenanceExecutingContext.Cancel(maxGenerationToReap);
            _maintenanceExecutingContext.Dispose();
        }
コード例 #2
0
 public void Dispose()
 {
     _maintenanceExecutingContext?.Dispose();
     _globalCancellationTokenSource.Cancel();
     _globalCancellationTokenSource.Dispose();
 }