AutoResetUniTaskCompletionSource<T> Class
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
public class AutoResetUniTaskCompletionSource<T> : IUniTaskSource<T>, IUniTaskSource, IValueTaskSource, IValueTaskSource<T>, ITaskPoolNode<AutoResetUniTaskCompletionSource<T>>, IPromise<T>, IResolvePromise<T>, IRejectPromise, ICancelPromise
Inheritance
System.Object → AutoResetUniTaskCompletionSource<T>Implements
System.Threading.Tasks.Sources.IValueTaskSource
System.Threading.Tasks.Sources.IValueTaskSource<T>
IPromise<T>
Type Parameters
T
Members
Properties
Name | Description |
---|---|
NextNode | |
Task |
Methods
Explicit Interface Implementations
Name | Description |
---|---|
IUniTaskSource.GetResult(Int16) |
Properties
NextNode
public ref AutoResetUniTaskCompletionSource<T> NextNode { get; }
Property Value
Task
public UniTask<T> Task { get; }
Property Value
- UniTask<T>
Methods
Create()
public static AutoResetUniTaskCompletionSource<T> Create()
Returns
CreateFromCanceled(CancellationToken, out Int16)
public static AutoResetUniTaskCompletionSource<T> CreateFromCanceled(CancellationToken cancellationToken, out short token)
Parameters
cancellationToken
System.Threading.CancellationTokentoken
System.Int16
Returns
CreateFromException(Exception, out Int16)
public static AutoResetUniTaskCompletionSource<T> CreateFromException(Exception exception, out short token)
Parameters
exception
System.Exceptiontoken
System.Int16
Returns
CreateFromResult(T, out Int16)
public static AutoResetUniTaskCompletionSource<T> CreateFromResult(T result, out short token)
Parameters
result
Ttoken
System.Int16
Returns
GetResult(Int16)
public T GetResult(short token)
Parameters
token
System.Int16
Returns
- T
GetStatus(Int16)
public UniTaskStatus GetStatus(short token)
Parameters
token
System.Int16
Returns
OnCompleted(Action<Object>, Object, Int16)
public void OnCompleted(Action<object> continuation, object state, short token)
Parameters
continuation
System.Action<System.Object>state
System.Objecttoken
System.Int16
TrySetCanceled(CancellationToken)
public bool TrySetCanceled(CancellationToken cancellationToken = default(CancellationToken))
Parameters
cancellationToken
System.Threading.CancellationToken
Returns
- System.Boolean
TrySetException(Exception)
public bool TrySetException(Exception exception)
Parameters
exception
System.Exception
Returns
- System.Boolean
TrySetResult(T)
public bool TrySetResult(T result)
Parameters
result
T
Returns
- System.Boolean
UnsafeGetStatus()
public UniTaskStatus UnsafeGetStatus()
Returns
Explicit Interface Implementations
IUniTaskSource.GetResult(Int16)
void IUniTaskSource.GetResult(short token)
Parameters
token
System.Int16
Implements
System.Threading.Tasks.Sources.IValueTaskSource
System.Threading.Tasks.Sources.IValueTaskSource<TResult>