CancellationTokenExtensions Class
Assembly: cs.temp.dll.dll
public static class CancellationTokenExtensions
Inheritance
System.Object →
CancellationTokenExtensions
Members
Methods
Methods
AddTo(IDisposable, CancellationToken)
public static CancellationTokenRegistration AddTo(this IDisposable disposable, CancellationToken cancellationToken)
Parameters
disposable
IDisposable
cancellationToken
System.Threading.CancellationToken
Returns
- System.Threading.CancellationTokenRegistration
RegisterWithoutCaptureExecutionContext(CancellationToken, Action)
public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action callback)
Parameters
cancellationToken
System.Threading.CancellationToken
callback
Action
Returns
- System.Threading.CancellationTokenRegistration
RegisterWithoutCaptureExecutionContext(CancellationToken, Action<Object>, Object)
public static CancellationTokenRegistration RegisterWithoutCaptureExecutionContext(this CancellationToken cancellationToken, Action<object> callback, object state)
Parameters
cancellationToken
System.Threading.CancellationToken
callback
Action<System.Object>
state
System.Object
Returns
- System.Threading.CancellationTokenRegistration
ToCancellationToken(UniTask)
public static CancellationToken ToCancellationToken(this UniTask task)
Returns
- System.Threading.CancellationToken
ToCancellationToken(UniTask, CancellationToken)
public static CancellationToken ToCancellationToken(this UniTask task, CancellationToken linkToken)
Parameters
task
UniTask
linkToken
System.Threading.CancellationToken
Returns
- System.Threading.CancellationToken
ToCancellationToken<T>(UniTask<T>)
public static CancellationToken ToCancellationToken<T>(this UniTask<T> task)
Returns
- System.Threading.CancellationToken
ToCancellationToken<T>(UniTask<T>, CancellationToken)
public static CancellationToken ToCancellationToken<T>(this UniTask<T> task, CancellationToken linkToken)
Parameters
task
UniTask<T>
linkToken
System.Threading.CancellationToken
Returns
- System.Threading.CancellationToken
ToUniTask(CancellationToken)
public static (UniTask, CancellationTokenRegistration) ToUniTask(this CancellationToken cancellationToken)
Parameters
cancellationToken
System.Threading.CancellationToken
Returns
- System.ValueTuple<UniTask, System.Threading.CancellationTokenRegistration>
WaitUntilCanceled(CancellationToken)
public static CancellationTokenAwaitable WaitUntilCanceled(this CancellationToken cancellationToken)
Parameters
cancellationToken
System.Threading.CancellationToken