Class ActivityMonitorPathCatcher
The "Path Catcher" captures the current path of the opened groups and the last, current, line and exposes it thanks to a read only list of ActivityMonitorPathCatcher.PathElement (the DynamicPath property), plus two other specific paths, the LastErrorPath and the LastWarnOrErrorPath.
Inherited Members
Namespace: CK.Core
Assembly: CK.ActivityMonitor.dll
Syntax
public sealed class ActivityMonitorPathCatcher : ActivityMonitorClient, IActivityMonitorBoundClient, IActivityMonitorClient
Constructors
| Improve this Doc View SourceActivityMonitorPathCatcher()
Initializes a new ActivityMonitorPathCatcher.
Declaration
public ActivityMonitorPathCatcher()
Properties
| Improve this Doc View SourceDynamicPath
Gets the current (mutable) path. You may use ToArray or ToList methods to take a snapshot of this list. Use the extension method ToStringPath(IEnumerable<ActivityMonitorPathCatcher.PathElement>, String, String, String, String, String, String, String, String, String, String) to easily format this path.
Declaration
public IReadOnlyList<ActivityMonitorPathCatcher.PathElement> DynamicPath { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ActivityMonitorPathCatcher.PathElement> |
IsLocked
Gets or sets whether this ActivityMonitorPathCatcher can be removed from its monitor. Defaults to false. When setting this to true, UnregisterClient(IActivityMonitorClient) does not remove it.
Declaration
public bool IsLocked { get; set; }
Property Value
| Type | Description |
|---|---|
| Boolean |
LastErrorPath
Gets the last DynamicPath where an Error or a Fatal occurred. Null if no error nor fatal occurred. Use the extension method ToStringPath(IEnumerable<ActivityMonitorPathCatcher.PathElement>, String, String, String, String, String, String, String, String, String, String) to easily format this path.
Declaration
public IReadOnlyList<ActivityMonitorPathCatcher.PathElement> LastErrorPath { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ActivityMonitorPathCatcher.PathElement> |
LastWarnOrErrorPath
Gets the last path with a Fatal, Error or a Warn. Null if no error, fatal nor warn occurred. Use the extension method ToStringPath(IEnumerable<ActivityMonitorPathCatcher.PathElement>, String, String, String, String, String, String, String, String, String, String) to easily format this path.
Declaration
public IReadOnlyList<ActivityMonitorPathCatcher.PathElement> LastWarnOrErrorPath { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ActivityMonitorPathCatcher.PathElement> |
Methods
| Improve this Doc View SourceClearLastErrorPath()
Clears current LastErrorPath (sets it to null).
Declaration
public void ClearLastErrorPath()
ClearLastWarnPath(Boolean)
Clears current LastWarnOrErrorPath (sets it to null), and optionally clears LastErrorPath.
Declaration
public void ClearLastWarnPath(bool clearLastErrorPath = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | clearLastErrorPath |
OnGroupClosed(IActivityLogGroup, IReadOnlyList<ActivityLogGroupConclusion>)
Removes one or two last ActivityMonitorPathCatcher.PathElement of DynamicPath.
Declaration
protected override void OnGroupClosed(IActivityLogGroup group, IReadOnlyList<ActivityLogGroupConclusion> conclusions)
Parameters
| Type | Name | Description |
|---|---|---|
| IActivityLogGroup | group | The closed group. |
| IReadOnlyList<ActivityLogGroupConclusion> | conclusions | Texts that conclude the group. Never null but can be empty. |
Overrides
| Improve this Doc View SourceOnOpenGroup(IActivityLogGroup)
Appends or updates the last ActivityMonitorPathCatcher.PathElement of DynamicPath and handles errors or warning.
Declaration
protected override void OnOpenGroup(IActivityLogGroup group)
Parameters
| Type | Name | Description |
|---|---|---|
| IActivityLogGroup | group | The newly opened IActivityLogGroup. |
Overrides
| Improve this Doc View SourceOnUnfilteredLog(ActivityMonitorLogData)
Appends or updates the last ActivityMonitorPathCatcher.PathElement of DynamicPath and handles errors or warning.
Declaration
protected override void OnUnfilteredLog(ActivityMonitorLogData data)
Parameters
| Type | Name | Description |
|---|---|---|
| ActivityMonitorLogData | data | Log data. Never null. |
Overrides
Explicit Interface Implementations
| Improve this Doc View SourceIActivityMonitorBoundClient.IsDead
Declaration
bool IActivityMonitorBoundClient.IsDead { get; }
Returns
| Type | Description |
|---|---|
| Boolean |
Implements
| Improve this Doc View SourceIActivityMonitorBoundClient.SetMonitor(IActivityMonitorImpl, Boolean)
Declaration
void IActivityMonitorBoundClient.SetMonitor(IActivityMonitorImpl source, bool forceBuggyRemove)
Parameters
| Type | Name | Description |
|---|---|---|
| IActivityMonitorImpl | source | |
| Boolean | forceBuggyRemove |