# AutoResetUniTaskCompletionSource<T> Class | UniTask

Show / Hide Table of Contents

# AutoResetUniTaskCompletionSource<T> Class

###### Namespace: Cysharp.Threading.Tasks

###### Assembly: cs.temp.dll.dll

    public class AutoResetUniTaskCompletionSource<T> : IUniTaskSource<T>, IUniTaskSource, ITaskPoolNode<AutoResetUniTaskCompletionSource<T>>, IPromise<T>, IResolvePromise<T>, IRejectPromise, ICancelPromise

##### Inheritance

System.Object → AutoResetUniTaskCompletionSource<T>

##### Implements

IUniTaskSource<T>
IUniTaskSource
ITaskPoolNode<AutoResetUniTaskCompletionSource<T>>
IPromise<T>
IResolvePromise<T>
IRejectPromise
ICancelPromise

#### Type Parameters

`T`

### Members

#### Properties

Name | Description
--- | ---
NextNode |
Task |

#### Methods

Name | Description
--- | ---
Create() |
CreateFromCanceled(CancellationToken, out Int16) |
CreateFromException(Exception, out Int16) |
CreateFromResult(T, out Int16) |
GetResult(Int16) |
GetStatus(Int16) |
OnCompleted(Action<Object>, Object, Int16) |
TrySetCanceled(CancellationToken) |
TrySetException(Exception) |
TrySetResult(T) |
UnsafeGetStatus() |

#### Explicit Interface Implementations

Name | Description
--- | ---
IUniTaskSource.GetResult(Int16) |

### Properties

#### NextNode

    public ref AutoResetUniTaskCompletionSource<T> NextNode { get; }

##### Property Value

AutoResetUniTaskCompletionSource<T>

#### Task

    public UniTask<T> Task { get; }

##### Property Value

UniTask<T>

### Methods

#### Create()

    public static AutoResetUniTaskCompletionSource<T> Create()

##### Returns

AutoResetUniTaskCompletionSource<T>

#### CreateFromCanceled(CancellationToken, out Int16)

    public static AutoResetUniTaskCompletionSource<T> CreateFromCanceled(CancellationToken cancellationToken, out short token)

##### Parameters

`cancellationToken` CancellationToken
`token` System.Int16

##### Returns

AutoResetUniTaskCompletionSource<T>

#### CreateFromException(Exception, out Int16)

    public static AutoResetUniTaskCompletionSource<T> CreateFromException(Exception exception, out short token)

##### Parameters

`exception` System.Exception
`token` System.Int16

##### Returns

AutoResetUniTaskCompletionSource<T>

#### CreateFromResult(T, out Int16)

    public static AutoResetUniTaskCompletionSource<T> CreateFromResult(T result, out short token)

##### Parameters

`result` T
`token` System.Int16

##### Returns

AutoResetUniTaskCompletionSource<T>

#### 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

UniTaskStatus

#### OnCompleted(Action<Object>, Object, Int16)

    public void OnCompleted(Action<object> continuation, object state, short token)

##### Parameters

`continuation` System.Action<System.Object>
`state` System.Object
`token` System.Int16

#### TrySetCanceled(CancellationToken)

    public bool TrySetCanceled(CancellationToken cancellationToken = null)

##### Parameters

`cancellationToken` 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

UniTaskStatus

### Explicit Interface Implementations

#### IUniTaskSource.GetResult(Int16)

    void IUniTaskSource.GetResult(short token)

##### Parameters

`token` System.Int16

### Implements

IUniTaskSource<T>
IUniTaskSource
ITaskPoolNode<T>
IPromise<T>
IResolvePromise<T>
IRejectPromise
ICancelPromise