# ResponseCompletionSource&lt;TResult&gt;.OnCompleted(Action&lt;object?&gt;, object?, short, ValueTaskSourceOnCompletedFlags)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.responsecompletionsource-1/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.serialization/orleans.serialization.invocation.responsecompletionsource-1/methods/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Serialization/Invocation/ResponseCompletionSource.cs#L138)

```csharp
public void OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags)
```

Schedules the continuation action for this `System.Threading.Tasks.Sources.IValueTaskSource-1`.

### Parameters

- `continuation` (`Action<object?>`): The continuation to invoke when the operation has completed.
- `state` (`object?`): The state object to pass to `continuation` when it's invoked.
- `token` (`short`): An opaque value that was provided to the `System.Threading.Tasks.ValueTask` constructor.
- `flags` (`ValueTaskSourceOnCompletedFlags`): The flags describing the behavior of the continuation.
