Class ActivityMonitor.DependentToken
Describes the origin of a dependent activity: it is created by DependentActivity(IActivityMonitor, String, Int32) (extension methods).
Inherited Members
Namespace: CK.Core
Assembly: CK.ActivityMonitor.dll
Syntax
[Serializable]
public class DependentToken
Properties
| Improve this Doc View SourceCreationDate
Gets the creation date. This is the log time of the unfiltered Info log that has been emitted in the originator monitor.
Declaration
public DateTimeStamp CreationDate { get; }
Property Value
| Type | Description |
|---|---|
| CK.Core.DateTimeStamp |
OriginatorId
Unique identifier of the activity that created this dependent token.
Declaration
public Guid OriginatorId { get; }
Property Value
| Type | Description |
|---|---|
| Guid |
Topic
Gets the topic that must be set on the dependent activity. When null, the current Topic of the dependent monitor is not changed.
Declaration
public string Topic { get; }
Property Value
| Type | Description |
|---|---|
| String |
Methods
| Improve this Doc View SourceParse(String)
Parses a ToString() string or throws a FormatException on error.
Declaration
public static ActivityMonitor.DependentToken Parse(string s)
Parameters
| Type | Name | Description |
|---|---|---|
| String | s | The string to parse. |
Returns
| Type | Description |
|---|---|
| ActivityMonitor.DependentToken | The resulting dependent token. |
ToString()
Overridden to give a readable description of this token that can be Parse(String)d (or TryParse(String, out ActivityMonitor.DependentToken)) back: The format is "{OriginatorId} at CreationDate (with topic '...'|without topic).".
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| String | A readable string. |
Overrides
| Improve this Doc View SourceTryParse(String, out ActivityMonitor.DependentToken)
Tries to parse a ToString() string.
Declaration
public static bool TryParse(string s, out ActivityMonitor.DependentToken t)
Parameters
| Type | Name | Description |
|---|---|---|
| String | s | The string to parse. |
| ActivityMonitor.DependentToken | t | The resulting dependent token. |
Returns
| Type | Description |
|---|---|
| Boolean | True on success, false otherwise. |
TryParseLaunchOrCreateMessage(String, out Boolean, out Boolean, out String)
Tries to parse a launch or create message.
Declaration
public static bool TryParseLaunchOrCreateMessage(string message, out bool launched, out bool withTopic, out string dependentTopic)
Parameters
| Type | Name | Description |
|---|---|---|
| String | message | The message to parse. |
| Boolean | launched | True if the activity has been launched or the token has only be created. |
| Boolean | withTopic | True if an explicit topic has been associated to the dependent activity. |
| String | dependentTopic | When withTopic is true, this contains the explicitly set topic. |
Returns
| Type | Description |
|---|---|
| Boolean | True on success. |
TryParseStartMessage(String, out Guid, out DateTimeStamp)
Attempts to parse the start message of a dependent activity (tagged with StartDependentActivity).
Declaration
public static bool TryParseStartMessage(string startMessage, out Guid id, out DateTimeStamp time)
Parameters
| Type | Name | Description |
|---|---|---|
| String | startMessage | The start message to parse. |
| Guid | id | The originator monitor identifier. |
| CK.Core.DateTimeStamp | time | The creation time of the dependent activity. |
Returns
| Type | Description |
|---|---|
| Boolean | True on success. |