C# Класс WebApplications.Utilities.Threading.AsyncResult

Наследование: IAsyncResult
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AsyncCallbackCompleteOpHelperNoReturnValue void
CallingThreadShouldSetTheEvent bool
CompleteOpHelper void
WaitCallbackCompleteOpHelperNoReturnValue void

Открытые методы

Метод Описание
AsyncResult ( AsyncCallback asyncCallback, object state ) : System

Initializes a new instance of the AsyncResult class.

AsyncResult ( AsyncCallback asyncCallback, object state, object initiatingObject ) : System

Initializes a new instance of the AsyncResult class.

EndInvoke ( ) : void

Frees up the resources used by the asynchronous operation. If the asynchronous operation failed then this method throws the exception.

SetAsCancelled ( ) : void

Set the status of the asynchronous operation to cancelled.

SetAsCompleted ( Exception exception = null, bool completedSynchronously = false ) : void

Set the status of the asynchronous operation to completed.

Защищенные методы

Метод Описание
BeginInvokeOnWorkerThread ( ) : IAsyncResult

Returns the status of an operation that was queued to the thread pool.

GetAsyncCallbackHelper ( ) : AsyncCallback

Returns a single delegate to a method that will invoke the desired AsyncCallback

OnCompleteOperation ( IAsyncResult result ) : void

Приватные методы

Метод Описание
AsyncCallbackCompleteOpHelperNoReturnValue ( [ otherAsyncResult ) : void
CallingThreadShouldSetTheEvent ( ) : bool
CompleteOpHelper ( IAsyncResult ar ) : void

A helper function used to run the callback on the completed asynchronous operation.

WaitCallbackCompleteOpHelperNoReturnValue ( [ o ) : void

Описание методов

AsyncResult() публичный Метод

Initializes a new instance of the AsyncResult class.
public AsyncResult ( AsyncCallback asyncCallback, object state ) : System
asyncCallback AsyncCallback The method to execute once the operation completes.
state object /// The object that can be obtained via the property. ///
Результат System

AsyncResult() публичный Метод

Initializes a new instance of the AsyncResult class.
public AsyncResult ( AsyncCallback asyncCallback, object state, object initiatingObject ) : System
asyncCallback AsyncCallback The method that should be executed when the operation completes.
state object The object that can be obtained via the AsyncState property.
initiatingObject object /// The object that is initiating the asynchronous operation. /// This is stored in the property. ///
Результат System

BeginInvokeOnWorkerThread() защищенный Метод

Returns the status of an operation that was queued to the thread pool.
protected BeginInvokeOnWorkerThread ( ) : IAsyncResult
Результат IAsyncResult

EndInvoke() публичный Метод

Frees up the resources used by the asynchronous operation. If the asynchronous operation failed then this method throws the exception.
public EndInvoke ( ) : void
Результат void

GetAsyncCallbackHelper() защищенный статический Метод

Returns a single delegate to a method that will invoke the desired AsyncCallback
protected static GetAsyncCallbackHelper ( ) : AsyncCallback
Результат AsyncCallback

OnCompleteOperation() защищенный Метод

protected OnCompleteOperation ( IAsyncResult result ) : void
result IAsyncResult
Результат void

SetAsCancelled() публичный Метод

Set the status of the asynchronous operation to cancelled.
public SetAsCancelled ( ) : void
Результат void

SetAsCompleted() публичный Метод

Set the status of the asynchronous operation to completed.
The operation result has already been set previously.
public SetAsCompleted ( Exception exception = null, bool completedSynchronously = false ) : void
exception System.Exception /// If non-null then this identifies the exception that occurred while processing the asynchronous operation. ///
completedSynchronously bool Indicates whether the operation completed synchronously or asynchronously.
Результат void