C# Class CK.Core.ActivityMonitor.DependentToken

Datei anzeigen Open project: Invenietis/ck-core Class Usage Examples

Private Properties

Property Type Description
AppendTopic string
CreateWithDependentTopic DependentToken
CreateWithMonitorTopic DependentToken
DependentToken System
ExtractTopic bool
FormatStartMessage string
MatchOriginatorAndTime bool
Start IDisposable

Public Methods

Method Description
CreateDependentMonitor ( Action configurator = null, [ fileName = null, [ lineNumber ) : IDisposableActivityMonitor

Creates a monitor and executes StartDependentActivity on it that opens a root info group with the token information.

Parse ( string s ) : DependentToken

Parses a DependentToken.ToString() string or throws a FormatException on error.

ToString ( ) : string

Overridden to give a readable description of this token that can be Parsed (or TryParse) back: The format is "{OriginatorId} at CreationDate (with topic '...'|without topic).".

TryParse ( string s, DependentToken &t ) : bool

Tries to parse a DependentToken.ToString() string.

TryParseLaunchOrCreateMessage ( string message, bool &launched, bool &withTopic, string &dependentTopic ) : bool

Tries to parse a launch or create message.

TryParseStartMessage ( string startMessage, System.Guid &id, DateTimeStamp &time ) : bool

Attempts to parse the start message of a dependent activity (tagged with ActivityMonitor.Tags.StartDependentActivity).

Private Methods

Method Description
AppendTopic ( string msg, string dependentTopic ) : string
CreateWithDependentTopic ( IActivityMonitor m, bool launchActivity, string dependentTopic, string &msg ) : DependentToken
CreateWithMonitorTopic ( IActivityMonitor m, bool launchActivity, string &msg ) : DependentToken
DependentToken ( System.Guid monitorId, DateTimeStamp logTime, string topic ) : System
ExtractTopic ( string message, int start, string &dependentTopic ) : bool
FormatStartMessage ( ) : string
MatchOriginatorAndTime ( StringMatcher m, System.Guid &id, DateTimeStamp &time ) : bool
Start ( ActivityMonitor token, IActivityMonitor monitor, string fileName, int lineNumber ) : IDisposable

Method Details

CreateDependentMonitor() public method

Creates a monitor and executes StartDependentActivity on it that opens a root info group with the token information.
public CreateDependentMonitor ( Action configurator = null, [ fileName = null, [ lineNumber ) : IDisposableActivityMonitor
configurator Action Optionally applies any configuration on the created monitor before opening the root activity group.
fileName [ Source file name of the emitter (automatically injected by C# compiler but can be explicitly set).
lineNumber [ Line number in the source file (automatically injected by C# compiler but can be explicitly set).
return IDisposableActivityMonitor

Parse() static public method

Parses a DependentToken.ToString() string or throws a FormatException on error.
static public Parse ( string s ) : DependentToken
s string The string to parse.
return DependentToken

ToString() public method

Overridden to give a readable description of this token that can be Parsed (or TryParse) back: The format is "{OriginatorId} at CreationDate (with topic '...'|without topic).".
public ToString ( ) : string
return string

TryParse() static public method

Tries to parse a DependentToken.ToString() string.
static public TryParse ( string s, DependentToken &t ) : bool
s string The string to parse.
t DependentToken The resulting dependent token.
return bool

TryParseLaunchOrCreateMessage() public static method

Tries to parse a launch or create message.
public static TryParseLaunchOrCreateMessage ( string message, bool &launched, bool &withTopic, string &dependentTopic ) : bool
message string The message to parse.
launched bool True if the activity has been launched or the token has only be created.
withTopic bool True if an explicit topic has been associated to the dependent activity.
dependentTopic string When is true, this contains the explicitly set topic.
return bool

TryParseStartMessage() static public method

Attempts to parse the start message of a dependent activity (tagged with ActivityMonitor.Tags.StartDependentActivity).
static public TryParseStartMessage ( string startMessage, System.Guid &id, DateTimeStamp &time ) : bool
startMessage string The start message to parse.
id System.Guid The originator monitor identifier.
time DateTimeStamp The creation time of the dependent activity.
return bool