EventHandlerTaskAsyncHelper EventHandlerTaskAsyncHelper EventHandlerTaskAsyncHelper EventHandlerTaskAsyncHelper Class


Converts task-returning asynchronous methods into methods that use the asynchronous programming model used in previous versions of ASP.NET and that is based on begin and end events.

public ref class EventHandlerTaskAsyncHelper sealed
public sealed class EventHandlerTaskAsyncHelper
type EventHandlerTaskAsyncHelper = class
Public NotInheritable Class EventHandlerTaskAsyncHelper


To handle asynchronous tasks in ASP.NET 4.5, you implement the logic to return a task as a TaskEventHandler delegate. This model of asynchronous task-based programming supersedes the model used in previous versions of ASP.NET, which bases all event handling on begin and end events. After you implement a TaskEventHandler delegate, you can then pass it to the EventHandlerTaskAsyncHelper constructor, which wraps the task-returning logic and converts the handler to the model that uses begin and end events. The EventHandlerTaskAsyncHelper class enables your TaskEventHandler object to be compatible with the ASP.NET page framework. When you call the AddOnPreRenderCompleteAsync method to process the task for an asynchronous page, you can use the BeginEventHandler and EndEventHandler properties to pass the converted begin and event handlers to the method.


EventHandlerTaskAsyncHelper(TaskEventHandler) EventHandlerTaskAsyncHelper(TaskEventHandler) EventHandlerTaskAsyncHelper(TaskEventHandler) EventHandlerTaskAsyncHelper(TaskEventHandler)

Initializes a new instance of the EventHandlerTaskAsyncHelper class.


BeginEventHandler BeginEventHandler BeginEventHandler BeginEventHandler

Represents the BeginEventHandler method for an asynchronous task.

EndEventHandler EndEventHandler EndEventHandler EndEventHandler

Represents the EndEventHandler method for an asynchronous task.


Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to