BEHelper.AsyncContext.AsyncPost C# (CSharp) Метод

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

Post a call to the specified method on the creator thread
public AsyncPost ( SendOrPostCallback callback, object state ) : void
callback SendOrPostCallback Method that is to be called
state object Method parameter/state
Результат void
        public void AsyncPost(SendOrPostCallback callback, object state)
        {
            if (IsAsyncCreatorThread)
                callback(state); // Call the method directly
            else
                AsynchronizationContext.Post(callback, state);  // Post on creator thread
        }
    }

Usage Example

Пример #1
0
 public void AsyncPost(SendOrPostCallback callback, object state)
 {
     _asyncContext.AsyncPost(callback, state);
 }