Show / Hide Table of Contents

Class ConsoleLifetimeTokenSource

Represents a token that becomes canceled if the console application is requested to stop.

Inheritance
object
CancellationTokenSource
ConsoleLifetimeTokenSource
Implements
IDisposable
Inherited Members
CancellationTokenSource.Cancel()
CancellationTokenSource.Cancel(bool)
CancellationTokenSource.CancelAsync()
CancellationTokenSource.CancelAfter(TimeSpan)
CancellationTokenSource.CancelAfter(int)
CancellationTokenSource.TryReset()
CancellationTokenSource.Dispose()
CancellationTokenSource.CreateLinkedTokenSource(CancellationToken, CancellationToken)
CancellationTokenSource.CreateLinkedTokenSource(CancellationToken)
CancellationTokenSource.CreateLinkedTokenSource(params CancellationToken[])
CancellationTokenSource.CreateLinkedTokenSource(params ReadOnlySpan<CancellationToken>)
CancellationTokenSource.IsCancellationRequested
CancellationTokenSource.Token
object.GetType()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: DotNext.Hosting
Assembly: DotNext.dll
Syntax
public sealed class ConsoleLifetimeTokenSource : CancellationTokenSource, IDisposable

Constructors

View Source

ConsoleLifetimeTokenSource()

Initializes a new lifetime token source.

Declaration
public ConsoleLifetimeTokenSource()

Properties

View Source

IsSupported

Gets a value indicating that ConsoleLifetimeTokenSource is supported.

Declaration
public static bool IsSupported { get; }
Property Value
Type Description
bool

Methods

View Source

Dispose(bool)

Declaration
protected override void Dispose(bool disposing)
Parameters
Type Name Description
bool disposing
Overrides
CancellationTokenSource.Dispose(bool)

Implements

IDisposable

Extension Methods

BasicExtensions.As<T>(T)
BasicExtensions.IsBetween<T, TLowerBound, TUpperBound>(T, TLowerBound, TUpperBound)
BasicExtensions.IsOneOf<T>(T, params ReadOnlySpan<T>)
  • View Source
☀
☾
In this article
Back to top
Supported by the .NET Foundation
☀
☾