C# Class Microsoft.HockeyApp.AsyncSynchronizationContext

Wrapper around a standard synchronization context, that catches any unhandled exceptions. Acts as a facade passing calls to the original SynchronizationContext
Inheritance: System.Threading.SynchronizationContext
Mostrar archivo Open project: bitstadium/HockeySDK-Windows Class Usage Examples

Public Methods

Method Description
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.

Private Methods

Method Description
EnsureContext ( SynchronizationContext context ) : void
WrapCallback ( SendOrPostCallback sendOrPostCallback ) : SendOrPostCallback

Method Details

AsyncSynchronizationContext() public method

Initializes a new instance of the AsyncSynchronizationContext class.
public AsyncSynchronizationContext ( SynchronizationContext syncContext ) : System
syncContext System.Threading.SynchronizationContext The synchronize context.
return System

CreateCopy() public method

When overridden in a derived class, creates a copy of the synchronization context.
public CreateCopy ( ) : SynchronizationContext
return System.Threading.SynchronizationContext

OperationCompleted() public method

When overridden in a derived class, responds to the notification that an operation has completed.
public OperationCompleted ( ) : void
return void

OperationStarted() public method

When overridden in a derived class, responds to the notification that an operation has started.
public OperationStarted ( ) : void
return void

Post() public method

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.
return void

Register() public static method

Registration method. Call this from OnLaunched and OnActivated inside the App.xaml.cs
public static Register ( ) : AsyncSynchronizationContext
return AsyncSynchronizationContext

RegisterForFrame() public static method

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.
return AsyncSynchronizationContext

Send() public method

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.
return void