# DurableSignal&lt;T&gt; Methods

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

## For(string) {#for-string-5a25491c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durablesignal-1/methods/for-string-5a25491c/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableSignal.cs#L43-L44)

```csharp
public DurableSignal<T> For(string suffix)
```

Gets a descriptor for one occurrence of this signal, named `{Name}/{suffix}`.

### Parameters

- `suffix` (`string`): The occurrence's stable identifier, such as an approval round or a line number.

### Returns

A descriptor with the derived name and the same value type.

### Exceptions

- `System.ArgumentNullException`: `suffix` is `null`.
- `System.ArgumentException`: `suffix` is empty.

## ToString {#tostring-2d0d9b11}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durablesignal-1/methods/tostring-2d0d9b11/)

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

```csharp
public override string ToString()
```

Returns a string that represents the current object.

### Returns

A string that represents the current object.

## TryWaitAsync(DateTimeOffset) {#trywaitasync-system-datetimeoffset-4aa5200f}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durablesignal-1/methods/trywaitasync-system-datetimeoffset-4aa5200f/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable.Abstractions/DurableSignal.cs#L85-L98)

```csharp
public DurableTask<(bool Received, T Value)> DurableSignal<T>.TryWaitAsync(DateTimeOffset deadline)
```

Creates a definition which waits for this signal until `deadline`.

### Parameters

- `deadline` (`DateTimeOffset`): The time, measured using host logical time, at which the wait stops.

### Returns

A definition which, awaited within a durable execution, runs as part of that execution and completes with `(true, value)` when the signal wins the race with `deadline`, and with `(false, default)` when the deadline wins.

## WaitAsync {#waitasync-2dbf9d75}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durablesignal-1/methods/waitasync-2dbf9d75/)

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

```csharp
public DurableTask<T> WaitAsync()
```

Creates a definition which waits for this signal and returns its value.

### Returns

A definition which, run within a durable execution, completes with the signal's recorded value. Awaited directly, it runs as part of the awaiting execution; as an input to [DurableTask](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletask/), it races other inputs, such as a [DurableTask](/orleans/docs/api/csharp/microsoft.orleans.durable.abstractions/orleans.durable.tasks.durabletask/) timeout.
