C# Класс Dynamo.Logging.Analytics

Utility class to support analytics tracking.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ShutDown void
Start void

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
ShutDown ( ) : void

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

Start ( IAnalyticsClient client ) : void

Starts analytics client

Описание методов

CreateTimedEvent() публичный статический Метод

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
Результат IDisposable

LogPiiInfo() публичный статический Метод

Logs usage data
public static LogPiiInfo ( string tag, string data ) : void
tag string Usage tag
data string Usage data
Результат void

TrackCommandEvent() публичный статический Метод

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
Результат IDisposable

TrackEvent() публичный статический Метод

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
Результат void

TrackException() публичный статический Метод

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
Результат void

TrackFileOperationEvent() публичный статический Метод

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
Результат IDisposable

TrackPreference() публичный статический Метод

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
Результат void

TrackScreenView() публичный статический Метод

Tracks screen view, such as Node view, Geometry view, Custom workspace etc.
public static TrackScreenView ( string viewName ) : void
viewName string Name of the screen
Результат void

TrackStartupTime() публичный статический Метод

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
Результат void

TrackTimedEvent() публичный статический Метод

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
Результат void