C# Класс DesktopAnalytics.Analytics

NB: if you don't dispose of this, your app might not really exit.
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
AttemptToGetUserIdSettingsFromDifferentChannel void
Client_Failed void
Client_Succeeded void
ExtractSetting string
GetLocationPropertiesOfThisMachine string>>.IEnumerable
GetOperatingSystemLabel string
GetUserConfigPath string
GetUserNameForEvent string
MakeSegmentIOProperties Properties
ReportIpAddressOfThisMachineAsync void
TrackWithApplicationProperties void
TryGetDefaultSettingsLocationInfo bool
TryGetSettingsLocationInfoFromEntryAssembly bool
UpdateSegmentIOInformationOnThisUser void
uname int

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

Метод Описание
Analytics ( string apiSecret, UserInfo userInfo, string>.Dictionary propertiesThatGoWithEveryEvent, bool allowTracking = true ) : System

Initialized a singleton; after calling this, use Analytics.Track() for each event.

Analytics ( string apiSecret, UserInfo userInfo, bool allowTracking = true ) : System
Dispose ( ) : void
IdentifyUpdate ( UserInfo userInfo ) : void

Use this after showing a registration dialog, so that this stuff is sent right away, rather than the next time you start up Analytics

ReportException ( Exception e ) : void

Sends the exception's message and stacktrace

ReportException ( Exception e, string>.Dictionary moreProperties ) : void

Sends the exception's message and stacktrace, plus additional information the program thinks may be relevant. Limited to MAX_EXCEPTION_REPORTS_PER_RUN

SetApplicationProperty ( string key, string value ) : void

Add a property that says something about the application, which goes out with every event.

Track ( string eventName ) : void

Record an event

Track ( string eventName, string>.Dictionary properties ) : void

Record an event with extra properties

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

Метод Описание
AttemptToGetUserIdSettingsFromDifferentChannel ( ) : void
Client_Failed ( BaseAction action, Exception e ) : void
Client_Succeeded ( BaseAction action ) : void
ExtractSetting ( string current, XDocument doc, string name ) : string
GetLocationPropertiesOfThisMachine ( ) : string>>.IEnumerable
GetOperatingSystemLabel ( ) : string
GetUserConfigPath ( ) : string
GetUserNameForEvent ( ) : string
MakeSegmentIOProperties ( string>.Dictionary properties ) : Properties
ReportIpAddressOfThisMachineAsync ( ) : void
TrackWithApplicationProperties ( string eventName, Properties properties = null ) : void

All calls to Segment.Analytics.Client.Track should run through here so we can provide defaults for every event

TryGetDefaultSettingsLocationInfo ( string &settingsLocation, string &softwareName ) : bool
TryGetSettingsLocationInfoFromEntryAssembly ( string &settingsLocation, string &softwareName ) : bool
UpdateSegmentIOInformationOnThisUser ( ) : void
uname ( IntPtr buf ) : int

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

Analytics() публичный Метод

Initialized a singleton; after calling this, use Analytics.Track() for each event.
public Analytics ( string apiSecret, UserInfo userInfo, string>.Dictionary propertiesThatGoWithEveryEvent, bool allowTracking = true ) : System
apiSecret string The segment.com apiSecret
userInfo UserInfo Information about the user that you have previous collected
propertiesThatGoWithEveryEvent string>.Dictionary A set of key-value pairs to send with *every* event
allowTracking bool If false, this will not do any communication with segment.io
Результат System

Analytics() публичный Метод

public Analytics ( string apiSecret, UserInfo userInfo, bool allowTracking = true ) : System
apiSecret string
userInfo UserInfo
allowTracking bool
Результат System

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

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

Use this after showing a registration dialog, so that this stuff is sent right away, rather than the next time you start up Analytics
public static IdentifyUpdate ( UserInfo userInfo ) : void
userInfo UserInfo
Результат void

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

Sends the exception's message and stacktrace
public static ReportException ( Exception e ) : void
e System.Exception
Результат void

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

Sends the exception's message and stacktrace, plus additional information the program thinks may be relevant. Limited to MAX_EXCEPTION_REPORTS_PER_RUN
public static ReportException ( Exception e, string>.Dictionary moreProperties ) : void
e System.Exception
moreProperties string>.Dictionary
Результат void

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

Add a property that says something about the application, which goes out with every event.
public static SetApplicationProperty ( string key, string value ) : void
key string
value string
Результат void

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

Record an event
public static Track ( string eventName ) : void
eventName string
Результат void

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

Record an event with extra properties
public static Track ( string eventName, string>.Dictionary properties ) : void
eventName string
properties string>.Dictionary
Результат void