System.Threading.CancellationToken Struct Reference
+ Collaboration diagram for System.Threading.CancellationToken:

Public Member Functions

 CancellationToken? (bool canceled)
 
internal CancellationToken (CancellationTokenSource source)
 
CancellationTokenRegistration Register (Action callback)
 
CancellationTokenRegistration Register (Action callback, bool useSynchronizationContext)
 
CancellationTokenRegistration Register (Action< object > callback, object state)
 
CancellationTokenRegistration Register (Action< object > callback, object state, bool useSynchronizationContext)
 
void ThrowIfCancellationRequested ()
 
bool Equals (CancellationToken other)
 
override bool Equals (object other)
 
override int GetHashCode ()
 

Static Public Member Functions

static bool operator== (CancellationToken left, CancellationToken right)
 
static bool operator != (CancellationToken left, CancellationToken right)
 

Public Attributes

readonly CancellationTokenSource source
 

Properties

static CancellationToken None [get]
 
bool CanBeCanceled [get]
 
bool IsCancellationRequested [get]
 
WaitHandle WaitHandle [get]
 
CancellationTokenSource?? Source [get]
 

Detailed Description

Definition at line 38 of file CancellationToken.cs.

Constructor & Destructor Documentation

◆ CancellationToken()

internal System.Threading.CancellationToken.CancellationToken ( CancellationTokenSource  source)

Definition at line 47 of file CancellationToken.cs.

Member Function Documentation

◆ CancellationToken?()

Definition at line 42 of file CancellationToken.cs.

◆ Equals() [1/2]

bool System.Threading.CancellationToken.Equals ( CancellationToken  other)

Definition at line 92 of file CancellationToken.cs.

◆ Equals() [2/2]

override bool System.Threading.CancellationToken.Equals ( object  other)

Definition at line 97 of file CancellationToken.cs.

◆ GetHashCode()

override int System.Threading.CancellationToken.GetHashCode ( )

Definition at line 102 of file CancellationToken.cs.

◆ operator !=()

static bool System.Threading.CancellationToken.operator != ( CancellationToken  left,
CancellationToken  right 
)
static

Definition at line 112 of file CancellationToken.cs.

◆ operator==()

static bool System.Threading.CancellationToken.operator== ( CancellationToken  left,
CancellationToken  right 
)
static

Definition at line 107 of file CancellationToken.cs.

◆ Register() [1/4]

CancellationTokenRegistration System.Threading.CancellationToken.Register ( Action  callback)

Definition at line 60 of file CancellationToken.cs.

◆ Register() [2/4]

CancellationTokenRegistration System.Threading.CancellationToken.Register ( Action  callback,
bool  useSynchronizationContext 
)

Definition at line 65 of file CancellationToken.cs.

◆ Register() [3/4]

CancellationTokenRegistration System.Threading.CancellationToken.Register ( Action< object >  callback,
object  state 
)

Definition at line 73 of file CancellationToken.cs.

◆ Register() [4/4]

CancellationTokenRegistration System.Threading.CancellationToken.Register ( Action< object >  callback,
object  state,
bool  useSynchronizationContext 
)

Definition at line 78 of file CancellationToken.cs.

◆ ThrowIfCancellationRequested()

void System.Threading.CancellationToken.ThrowIfCancellationRequested ( )

Definition at line 86 of file CancellationToken.cs.

Member Data Documentation

◆ source

readonly CancellationTokenSource System.Threading.CancellationToken.source

Definition at line 40 of file CancellationToken.cs.

Property Documentation

◆ CanBeCanceled

bool System.Threading.CancellationToken.CanBeCanceled
get

Definition at line 117 of file CancellationToken.cs.

◆ IsCancellationRequested

bool System.Threading.CancellationToken.IsCancellationRequested
get

Definition at line 123 of file CancellationToken.cs.

◆ None

CancellationToken System.Threading.CancellationToken.None
staticget

Definition at line 52 of file CancellationToken.cs.

◆ Source

CancellationTokenSource?? System.Threading.CancellationToken.Source
get

Definition at line 135 of file CancellationToken.cs.

◆ WaitHandle

WaitHandle System.Threading.CancellationToken.WaitHandle
get

Definition at line 129 of file CancellationToken.cs.


The documentation for this struct was generated from the following file: