C# Класс Microsoft.HockeyApp.AsyncSynchronizationContext

Wrapper around a standard synchronization context, that catches any unhandled exceptions. Acts as a facade passing calls to the original SynchronizationContext
Наследование: System.Threading.SynchronizationContext
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AsyncSynchronizationContext ( SynchronizationContext syncContext ) : System

Initializes a new instance of the AsyncSynchronizationContext class.

CreateCopy ( ) : SynchronizationContext

When overridden in a derived class, creates a copy of the synchronization context.

OperationCompleted ( ) : void

When overridden in a derived class, responds to the notification that an operation has completed.

OperationStarted ( ) : void

When overridden in a derived class, responds to the notification that an operation has started.

Post ( SendOrPostCallback d, object state ) : void

When overridden in a derived class, dispatches an asynchronous message to a synchronization context.

Register ( ) : AsyncSynchronizationContext

Registration method. Call this from OnLaunched and OnActivated inside the App.xaml.cs

RegisterForFrame ( System.Windows.Controls.Frame rootFrame, CrashHandler handler ) : AsyncSynchronizationContext

Links the synchronization context to the specified frame and ensures that it is still in use after each navigation event

Send ( SendOrPostCallback d, object state ) : void

When overridden in a derived class, dispatches a synchronous message to a synchronization context.

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

Метод Описание
EnsureContext ( SynchronizationContext context ) : void
WrapCallback ( SendOrPostCallback sendOrPostCallback ) : SendOrPostCallback

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

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

Initializes a new instance of the AsyncSynchronizationContext class.
public AsyncSynchronizationContext ( SynchronizationContext syncContext ) : System
syncContext System.Threading.SynchronizationContext The synchronize context.
Результат System

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

When overridden in a derived class, creates a copy of the synchronization context.
public CreateCopy ( ) : SynchronizationContext
Результат System.Threading.SynchronizationContext

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

When overridden in a derived class, responds to the notification that an operation has completed.
public OperationCompleted ( ) : void
Результат void

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

When overridden in a derived class, responds to the notification that an operation has started.
public OperationStarted ( ) : void
Результат void

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

When overridden in a derived class, dispatches an asynchronous message to a synchronization context.
public Post ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback The delegate to call.
state object The object passed to the delegate.
Результат void

Register() публичный статический Метод

Registration method. Call this from OnLaunched and OnActivated inside the App.xaml.cs
public static Register ( ) : AsyncSynchronizationContext
Результат AsyncSynchronizationContext

RegisterForFrame() публичный статический Метод

Links the synchronization context to the specified frame and ensures that it is still in use after each navigation event
rootFrame
public static RegisterForFrame ( System.Windows.Controls.Frame rootFrame, CrashHandler handler ) : AsyncSynchronizationContext
rootFrame System.Windows.Controls.Frame The root frame.
handler CrashHandler The handler.
Результат AsyncSynchronizationContext

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

When overridden in a derived class, dispatches a synchronous message to a synchronization context.
public Send ( SendOrPostCallback d, object state ) : void
d SendOrPostCallback The delegate to call.
state object The object passed to the delegate.
Результат void