Show / Hide Table of Contents

# AsyncUniTaskMethodBuilder<T> Struct

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

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

    public struct AsyncUniTaskMethodBuilder<T>

#### Type Parameters

`T`

### Members

#### Properties

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

#### Methods

Name | Description
--- | ---
AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine) |
AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine) |
Create() |
SetException(Exception) |
SetResult(T) |
SetStateMachine(IAsyncStateMachine) |
Start<TStateMachine>(ref TStateMachine) |

### Properties

#### Task

    public UniTask<T> Task { get; }

##### Property Value

UniTask<T>

### Methods

#### AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)

    public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
        where TAwaiter : INotifyCompletion where TStateMachine : IAsyncStateMachine

##### Parameters

`awaiter` TAwaiter
`stateMachine` TStateMachine

##### Type Parameters

`TAwaiter`
`TStateMachine`

#### AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter, ref TStateMachine)

    public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
        where TAwaiter : ICriticalNotifyCompletion where TStateMachine : IAsyncStateMachine

##### Parameters

`awaiter` TAwaiter
`stateMachine` TStateMachine

##### Type Parameters

`TAwaiter`
`TStateMachine`

#### Create()

    public static AsyncUniTaskMethodBuilder<T> Create()

##### Returns

AsyncUniTaskMethodBuilder<T>

#### SetException(Exception)

    public void SetException(Exception exception)

##### Parameters

`exception` System.Exception

#### SetResult(T)

    public void SetResult(T result)

##### Parameters

`result` T

#### SetStateMachine(IAsyncStateMachine)

    public void SetStateMachine(IAsyncStateMachine stateMachine)

##### Parameters

`stateMachine` IAsyncStateMachine

#### Start<TStateMachine>(ref TStateMachine)

    public void Start<TStateMachine>(ref TStateMachine stateMachine)
        where TStateMachine : IAsyncStateMachine

##### Parameters

`stateMachine` TStateMachine

##### Type Parameters

`TStateMachine`