# DurableTaskReferenceAwaiter&lt;TResult&gt; Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreferenceawaiter-1/)

## GetResult {#getresult-53e57952}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreferenceawaiter-1/methods/getresult-53e57952/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskReference.cs#L187)

```csharp
public TResult GetResult()
```

Returns the task's successful result, or throws its failure or cancellation.

## OnCompleted(Action) {#oncompleted-system-action-d4b3eff1}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreferenceawaiter-1/methods/oncompleted-system-action-d4b3eff1/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskReference.cs#L163-L171)

```csharp
public void OnCompleted(Action continuation)
```

Schedules the continuation action that's invoked when the instance completes.

### Parameters

- `continuation` (`Action`): The action to invoke when the operation completes.

### Exceptions

- `System.ArgumentNullException`: The `continuation` argument is null (Nothing in Visual Basic).

## UnsafeOnCompleted(Action) {#unsafeoncompleted-system-action-423e3dab}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.tasks.durabletaskreferenceawaiter-1/methods/unsafeoncompleted-system-action-423e3dab/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/DurableTasks/DurableTaskReference.cs#L176-L184)

```csharp
public void UnsafeOnCompleted(Action continuation)
```

Schedules the continuation action that's invoked when the instance completes.

### Parameters

- `continuation` (`Action`): The action to invoke when the operation completes.

### Exceptions

- `System.ArgumentNullException`: The `continuation` argument is null (Nothing in Visual Basic).
