C# Class DesktopAnalytics.Analytics

NB: if you don't dispose of this, your app might not really exit.
Inheritance: IDisposable
Afficher le fichier Open project: hatton/DesktopAnalytics.net Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

Analytics() public méthode

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
Résultat System

Analytics() public méthode

public Analytics ( string apiSecret, UserInfo userInfo, bool allowTracking = true ) : System
apiSecret string
userInfo UserInfo
allowTracking bool
Résultat System

Dispose() public méthode

public Dispose ( ) : void
Résultat void

IdentifyUpdate() public static méthode

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
Résultat void

ReportException() public static méthode

Sends the exception's message and stacktrace
public static ReportException ( Exception e ) : void
e System.Exception
Résultat void

ReportException() public static méthode

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
Résultat void

SetApplicationProperty() public static méthode

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
Résultat void

Track() public static méthode

Record an event
public static Track ( string eventName ) : void
eventName string
Résultat void

Track() public static méthode

Record an event with extra properties
public static Track ( string eventName, string>.Dictionary properties ) : void
eventName string
properties string>.Dictionary
Résultat void