C# Class CK.Core.ActivityMonitorExtension.DependentSender

Offers dependent token creation and launching.
Afficher le fichier Open project: Invenietis/ck-core

Méthodes publiques

Méthode Description
CreateToken ( bool delayedLaunch = false ) : ActivityMonitor.DependentToken

Creates a token for a dependent activity that will use the current monitor's topic. By default, a line with ActivityMonitor.Tags.CreateDependentActivity is logged that describes the creation of the token. If delayedLaunch is true, the actual launch of the dependent activity must be signaled thanks to Launch(ActivityMonitor.DependentToken) (otherwise there will be no way to bind the two activities).

CreateTokenWithTopic ( string dependentTopic, bool delayedLaunch = false ) : ActivityMonitor.DependentToken

Creates a token for a dependent activity that will be bound to a specified topic (or that will not change the dependent monitor's topic if null is specified).

Launch ( Action dependentLauncher ) : void

Launches one or more dependent activities (thanks to a delegate) that will use the current monitor's topic. This creates a new ActivityMonitor.DependentToken and opens a group that wraps the execution of the dependentLauncher.

Launch ( ActivityMonitor token ) : void

Signals the launch of one or more dependent activities by emitting a log line that describes the token. The token must have been created by CreateToken or CreateTokenWithTopic with a true delayedLaunch parameter otherwise an InvalidOperationException is thrown.

LaunchWithTopic ( Action dependentLauncher, string dependentTopic ) : void

Launches one or more dependent activities (thanks to a delegate) that will be bound to a specified topic (or that will not change the dependent monitor's topic if null is specified). This creates a new ActivityMonitor.DependentToken and opens a group that wraps the execution of the dependentLauncher.

Private Methods

Méthode Description
DependentSender ( IActivityMonitor m, string f, int n ) : System

Method Details

CreateToken() public méthode

Creates a token for a dependent activity that will use the current monitor's topic. By default, a line with ActivityMonitor.Tags.CreateDependentActivity is logged that describes the creation of the token. If delayedLaunch is true, the actual launch of the dependent activity must be signaled thanks to Launch(ActivityMonitor.DependentToken) (otherwise there will be no way to bind the two activities).
public CreateToken ( bool delayedLaunch = false ) : ActivityMonitor.DependentToken
delayedLaunch bool True to use later to indicate the actual launch of the dependent activity.
Résultat ActivityMonitor.DependentToken

CreateTokenWithTopic() public méthode

Creates a token for a dependent activity that will be bound to a specified topic (or that will not change the dependent monitor's topic if null is specified).
public CreateTokenWithTopic ( string dependentTopic, bool delayedLaunch = false ) : ActivityMonitor.DependentToken
dependentTopic string Topic for the dependent activity. Use null to not change the dependent monitor's topic.
delayedLaunch bool True to use later to indicate the actual launch of the dependent activity.
Résultat ActivityMonitor.DependentToken

Launch() public méthode

Launches one or more dependent activities (thanks to a delegate) that will use the current monitor's topic. This creates a new ActivityMonitor.DependentToken and opens a group that wraps the execution of the dependentLauncher.
public Launch ( Action dependentLauncher ) : void
dependentLauncher Action Must create and launch dependent activities that should use the created token.
Résultat void

Launch() public méthode

Signals the launch of one or more dependent activities by emitting a log line that describes the token. The token must have been created by CreateToken or CreateTokenWithTopic with a true delayedLaunch parameter otherwise an InvalidOperationException is thrown.
public Launch ( ActivityMonitor token ) : void
token ActivityMonitor Dependent token.
Résultat void

LaunchWithTopic() public méthode

Launches one or more dependent activities (thanks to a delegate) that will be bound to a specified topic (or that will not change the dependent monitor's topic if null is specified). This creates a new ActivityMonitor.DependentToken and opens a group that wraps the execution of the dependentLauncher.
public LaunchWithTopic ( Action dependentLauncher, string dependentTopic ) : void
dependentLauncher Action Must create and launch dependent activities that should use the created token.
dependentTopic string Topic for the dependent activity. When null, the dependent monitor's topic is not changed.
Résultat void