HttpResponse.OnCompleted Method

Definition

Overloads

OnCompleted(Func<Task>)

Adds a delegate to be invoked after the response has finished being sent to the client.

OnCompleted(Func<Object,Task>, Object)

Adds a delegate to be invoked after the response has finished being sent to the client.

OnCompleted(Func<Task>)

Source:
HttpResponse.cs
Source:
HttpResponse.cs
Source:
HttpResponse.cs

Adds a delegate to be invoked after the response has finished being sent to the client.

C#
public virtual void OnCompleted (Func<System.Threading.Tasks.Task> callback);

Parameters

callback
Func<Task>

The delegate to invoke.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

OnCompleted(Func<Object,Task>, Object)

Source:
HttpResponse.cs
Source:
HttpResponse.cs
Source:
HttpResponse.cs

Adds a delegate to be invoked after the response has finished being sent to the client.

C#
public abstract void OnCompleted (Func<object,System.Threading.Tasks.Task> callback, object state);

Parameters

callback
Func<Object,Task>

The delegate to invoke.

state
Object

A state object to capture and pass back to the delegate.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0