C# Class SevenSoftware.Windows.InstanceAwareApplication

Inheritance: System.Windows.Application, IPriorApplicationInstance, IDisposable
显示文件 Open project: robertbaker/SevenUpdate

Public Methods

Method Description
InstanceAwareApplication ( ) : System

Initializes a new instance of the InstanceAwareApplication class.

InstanceAwareApplication ( ApplicationInstanceAwareness awareness ) : System

Initializes a new instance of the InstanceAwareApplication class.

Protected Methods

Method Description
OnExit ( System.Windows.ExitEventArgs e ) : void

Raises the System.Windows.Application.Exit event.

OnStartup ( System.Windows.StartupEventArgs e ) : void

Raises the System.Windows.Application.Startup event.

OnStartup ( System.Windows.StartupEventArgs e, bool isFirstInstance ) : void

Raises the System.Windows.Application.Startup event.

OnStartupNextInstance ( StartupNextInstanceEventArgs e ) : void

Raises the InstanceAwareApplication.StartupNextInstance event.

OnStartupSignaledToPriorApplicationFailed ( ) : void

Called when the startup of the current application was unsuccessfully signaled to the prior application instance.

OnStartupSignaledToPriorApplicationSucceeded ( ) : void

Called when the startup of the current application was successfully signaled to the prior application instance.

Private Methods

Method Description
Dispose ( bool disposing ) : void

Releases unmanaged and - optionally - managed resources

ExtractParameters ( ApplicationInstanceAwareness awareness, string &prefix, IdentityReference &identity ) : void

Extracts some parameters from the specified ApplicationInstanceAwareness value.

GetApplicationId ( ) : string

Gets the application unique identifier.

GetPipeUri ( string applicationPath ) : Uri

Gets the Uri of the pipe used for inter-process communication.

IDisposable ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

IPriorApplicationInstance ( string args ) : void

Signals the startup of the next application instance.

InitializeFirstInstance ( Uri uri ) : void

Initializes the first application instance.

InitializeInstance ( System.Windows.StartupEventArgs e ) : bool

Initializes the application instance.

InitializeNextInstance ( Uri uri, string args ) : bool

Initializes the next application instance.

InitializeSynchronizationObjects ( string baseName, IdentityReference identity ) : void

Initializes the synchronization objects needed to deal with multiple instances of the same application.

OnStartupNextApplicationInstance ( string args ) : void

Called on next application instance startup.

TryDisposeSynchronizationObjects ( ) : void

Tries the dispose synchronization objects (if needed).

Method Details

InstanceAwareApplication() public method

Initializes a new instance of the InstanceAwareApplication class.
More than one instance of the System.Windows.Application class is created per System.AppDomain.
public InstanceAwareApplication ( ) : System
return System

InstanceAwareApplication() public method

Initializes a new instance of the InstanceAwareApplication class.
More than one instance of the System.Windows.Application class is created per System.AppDomain.
public InstanceAwareApplication ( ApplicationInstanceAwareness awareness ) : System
awareness ApplicationInstanceAwareness The instance awareness of the application.
return System

OnExit() protected method

Raises the System.Windows.Application.Exit event.
protected OnExit ( System.Windows.ExitEventArgs e ) : void
e System.Windows.ExitEventArgs An System.Windows.ExitEventArgs that contains the event data.
return void

OnStartup() protected final method

Raises the System.Windows.Application.Startup event.
protected final OnStartup ( System.Windows.StartupEventArgs e ) : void
e System.Windows.StartupEventArgs A System.Windows.StartupEventArgs that contains the event data.
return void

OnStartup() protected method

Raises the System.Windows.Application.Startup event.
protected OnStartup ( System.Windows.StartupEventArgs e, bool isFirstInstance ) : void
e System.Windows.StartupEventArgs The System.Windows.StartupEventArgs instance containing the event data.
isFirstInstance bool If set to true the current instance is the first application instance.
return void

OnStartupNextInstance() protected method

Raises the InstanceAwareApplication.StartupNextInstance event.
protected OnStartupNextInstance ( StartupNextInstanceEventArgs e ) : void
e StartupNextInstanceEventArgs The StartupNextInstanceEventArgs instance containing the event data.
return void

OnStartupSignaledToPriorApplicationFailed() protected method

Called when the startup of the current application was unsuccessfully signaled to the prior application instance.
protected OnStartupSignaledToPriorApplicationFailed ( ) : void
return void

OnStartupSignaledToPriorApplicationSucceeded() protected method

Called when the startup of the current application was successfully signaled to the prior application instance.
protected OnStartupSignaledToPriorApplicationSucceeded ( ) : void
return void