# ConfiguredDurableTask&lt;TResult&gt; Methods

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

## Detached {#detached-19e4da85}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/detached-19e4da85/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L685)

```csharp
public ConfiguredDurableTask<TResult> Detached()
```

Returns a configuration which starts the task as an independent root task.

## Detached(string) {#detached-string-7e8056a3}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/detached-string-7e8056a3/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L689)

```csharp
public ConfiguredDurableTask<TResult> Detached(string rootId)
```

Returns a configuration which starts the task as the independent root task `rootId`.

### Parameters

- `rootId` (`string`): The definition to start, such as a durable grain call.

### Exceptions

- `System.InvalidOperationException`: This configuration already has an identifier.
- `System.ArgumentException`: `rootId` is `null` or empty.

## GetAwaiter {#getawaiter-034babdd}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/getawaiter-034babdd/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L678)

```csharp
public DurableTaskAwaiter<TResult> GetAwaiter()
```

Gets an awaiter which runs or attaches to the task and returns its result once the result is durable.

## Post {#post-8bec022d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/post-8bec022d/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L704)

```csharp
public ScheduledTask<TResult> Post()
```

Stages the start of the task in the caller's durable outbox, and returns its handle without waiting.

### Returns

The task's handle, which the caller can await later.

### Exceptions

- `System.InvalidOperationException`: The caller has no durable outbox, for example because it's a client.

## ScheduleAsync(CancellationToken) {#scheduleasync-system-threading-cancellationtoken-600bc550}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/scheduleasync-system-threading-cancellationtoken-600bc550/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L697-L701)

```csharp
public Task<ScheduledTask<TResult>> ScheduleAsync(CancellationToken cancellationToken = default(CancellationToken))
```

Starts the task and returns its handle once the task's host has accepted and durably stored the task.

### Parameters

- `cancellationToken` (`CancellationToken`): A token which abandons the start. It doesn't cancel the task.

### Returns

The task's handle, whose [ScheduledTask](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.scheduledtask/) addresses the task.

## Shielded {#shielded-e728227f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/shielded-e728227f/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L692)

```csharp
public ConfiguredDurableTask<TResult> Shielded()
```

Returns a configuration which starts the task as an attached child, or runs it as part of the execution, out of reach of the starting execution's durable cancellation.

## WithId(string) {#withid-string-477b78b8}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.configureddurabletask-1/methods/withid-string-477b78b8/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableTask.cs#L682)

```csharp
public ConfiguredDurableTask<TResult> WithId(string name)
```

Returns a configuration which names the task.

### Parameters

- `name` (`string`): The definition to start.

### Exceptions

- `System.InvalidOperationException`: This configuration already has an identifier.
