C# Class Dynamo.Logging.Analytics

Utility class to support analytics tracking.
Exibir arquivo Open project: DynamoDS/Dynamo Class Usage Examples

Private Properties

Property Type Description
ShutDown void
Start void

Public Methods

Method Description
CreateTimedEvent ( Categories category, string variable, string description = "", int value = null ) : IDisposable

Creates a new timed event with start state and tracks its start. Disposing the returnd event will record the event completion.

LogPiiInfo ( string tag, string data ) : void

Logs usage data

TrackCommandEvent ( string name, string description = "", int value = null ) : IDisposable

Creates a new command event of the given name. Start of the command is tracked. When the event is disposed, it's completion is tracked.

TrackEvent ( Actions action, Categories category, string description = "", int value = null ) : void

Tracks an arbitrary event.

TrackException ( Exception ex, bool isFatal ) : void

Tracks an exception. If the exception is fatal, its recorded as crash.

TrackFileOperationEvent ( string filepath, Actions operation, int size, string description = "" ) : IDisposable

Creates a new file operation event and tracks the start of the event. Disposing the returned event will record its completion.

TrackPreference ( string name, string stringValue, int metricValue ) : void

Tracks user preference setting and its value.

TrackScreenView ( string viewName ) : void

Tracks screen view, such as Node view, Geometry view, Custom workspace etc.

TrackStartupTime ( string productName, System.TimeSpan time, string description = "" ) : void

Tracks application startup time

TrackTimedEvent ( Categories category, string variable, System.TimeSpan time, string description = "" ) : void

Tracks a timed event, when it has completed.

Private Methods

Method Description
ShutDown ( ) : void

Shuts down the client. Application life cycle end is tracked.

Start ( IAnalyticsClient client ) : void

Starts analytics client

Method Details

CreateTimedEvent() public static method

Creates a new timed event with start state and tracks its start. Disposing the returnd event will record the event completion.
public static CreateTimedEvent ( Categories category, string variable, string description = "", int value = null ) : IDisposable
category Categories Event category
variable string Timed varaible name
description string Event description
value int A metric value associated with the event
return IDisposable

LogPiiInfo() public static method

Logs usage data
public static LogPiiInfo ( string tag, string data ) : void
tag string Usage tag
data string Usage data
return void

TrackCommandEvent() public static method

Creates a new command event of the given name. Start of the command is tracked. When the event is disposed, it's completion is tracked.
public static TrackCommandEvent ( string name, string description = "", int value = null ) : IDisposable
name string Command name
description string Event description
value int A metric value associated with the event
return IDisposable

TrackEvent() public static method

Tracks an arbitrary event.
public static TrackEvent ( Actions action, Categories category, string description = "", int value = null ) : void
action Actions Action performed
category Categories Event category
description string Event description
value int A metric value associated with the event
return void

TrackException() public static method

Tracks an exception. If the exception is fatal, its recorded as crash.
public static TrackException ( Exception ex, bool isFatal ) : void
ex System.Exception Exception
isFatal bool If it's fatal
return void

TrackFileOperationEvent() public static method

Creates a new file operation event and tracks the start of the event. Disposing the returned event will record its completion.
public static TrackFileOperationEvent ( string filepath, Actions operation, int size, string description = "" ) : IDisposable
filepath string File path
operation Actions File operation
size int Size parameter
description string Event description
return IDisposable

TrackPreference() public static method

Tracks user preference setting and its value.
public static TrackPreference ( string name, string stringValue, int metricValue ) : void
name string Name of the preference
stringValue string Preference value as string
metricValue int Metric value of the preference
return void

TrackScreenView() public static method

Tracks screen view, such as Node view, Geometry view, Custom workspace etc.
public static TrackScreenView ( string viewName ) : void
viewName string Name of the screen
return void

TrackStartupTime() public static method

Tracks application startup time
public static TrackStartupTime ( string productName, System.TimeSpan time, string description = "" ) : void
productName string Dynamo product name
time System.TimeSpan Elapsed time
description string Optional description
return void

TrackTimedEvent() public static method

Tracks a timed event, when it has completed.
public static TrackTimedEvent ( Categories category, string variable, System.TimeSpan time, string description = "" ) : void
category Categories Event category
variable string Timed variable name
time System.TimeSpan Time taken by the event
description string Event description
return void