UniTask<T> Struct
Namespace: Cysharp.Threading.Tasks
Assembly: cs.temp.dll.dll
Lightweight unity specified task-like object.
public readonly struct UniTask<T>
Type Parameters
T
Members
Constructors
Name | Description |
---|---|
UniTask(T) | |
UniTask(IUniTaskSource<T>, Int16) |
Properties
Name | Description |
---|---|
Status |
Methods
Name | Description |
---|---|
AsUniTask() | |
GetAwaiter() | |
Preserve() | Memoizing inner IValueTaskSource. The result UniTask can await multiple. |
SuppressCancellationThrow() | returns (bool IsCanceled, T Result) instead of throws OperationCanceledException. |
ToString() |
Operators
Name | Description |
---|---|
Implicit(UniTask<T> to UniTask) |
Constructors
UniTask(T)
public UniTask(T result)
Parameters
result
T
UniTask(IUniTaskSource<T>, Int16)
public UniTask(IUniTaskSource<T> source, short token)
Parameters
source
IUniTaskSource<T>token
System.Int16
Properties
Status
public readonly UniTaskStatus Status { get; }
Property Value
Methods
AsUniTask()
public readonly UniTask AsUniTask()
Returns
GetAwaiter()
public readonly UniTask<T>.Awaiter GetAwaiter()
Returns
Preserve()
Memoizing inner IValueTaskSource. The result UniTask can await multiple.
public readonly UniTask<T> Preserve()
Returns
- UniTask<T>
SuppressCancellationThrow()
returns (bool IsCanceled, T Result) instead of throws OperationCanceledException.
public readonly UniTask<(bool IsCanceled, T Result)> SuppressCancellationThrow()
Returns
- UniTask<System.ValueTuple<System.Boolean, T>>
ToString()
public override readonly string ToString()
Returns
- System.String
Overrides
System.ValueType.ToString()
Operators
Implicit(UniTask<T> to UniTask)
public static implicit operator UniTask(UniTask<T> self)
Parameters
self
UniTask<T>