Esempio n. 1
0
        /// <summary>
        /// Dispose the scheduler.
        /// </summary>
        /// <remarks>
        /// When the scheduler is disposed, the <see cref="CancellationToken"/> is set.
        /// </remarks>
        /// <param name="disposing">
        /// Disposing is true when called manually,
        /// false when called by the finalizer.
        /// </param>
        private /*protected virtual*/ void Dispose(bool disposing)
        {
            // Do nothing if already called
            if (isDisposed)
            {
                return;
            }

            if (disposing)
            {
                // Free other state (managed objects).
                scheduler.Dispose();
            }

            // Free your own state (unmanaged objects).
            // Set large fields to null.

            // Mark disposed
            isDisposed = true;
        }
 public void Dispose()
 {
     scheduler.Dispose();
 }