C# Class Microsoft.HockeyApp.HockeyClient

Implements the HockeyClient singleton
Inheritance: HockeyApp.IHockeyClient, IHockeyClientInternal, IHockeyClientConfigurable
Mostra file Open project: bitstadium/HockeySDK-Windows Class Usage Examples

Private Properties

Property Type Description
CreateInitializedContextAsync Task
FillEmptyUserAndContactInfo void
HandleException void
HockeyClient Channel
Initialize void
IsTelemetryEnabled bool
Track void
TrackException void
TrackRequest void
TrackRequest void
WriteTelemetryToDebugOutput void

Public Methods

Method Description
AnyCrashesAvailableAsync ( ) : Task

Check for available crash-logs in storage

AuthorizeUserAsync ( string email, string password ) : Task

try to authorize a (hockeayapp) user by email and password

CheckForInitialization ( ) : void

Check if this HockeyClient has already been initialized (used internally by platform SDKs)

CreateCrashData ( Exception ex ) : ICrashData

Create a CrashData object from an Exception with the default CrashLogInformation

CreateCrashData ( Exception ex, CrashLogInformation crashLogInfo ) : ICrashData

Create a CrashData object from an Exception and a given CrashLogInformation

CreateCrashData ( string logString, string stackTrace ) : ICrashData

create a CrashData object from a logString and stacktrace (used for Unity crashes)

CreateNewFeedbackThread ( ) : IFeedbackThread

Create a feedback thread to post messages on

DeleteAllCrashesAsync ( ) : Task

Delete all crash-logs from storage

Deserialize ( Stream inputStream ) : ICrashData

Get an ICrashData object from crashlog-stream

Flush ( ) : void

Clears all buffers for this telemetry stream and causes any buffered data to be written to the underlying channel.

GetAppVersionsAsync ( ) : Task>

Get available app versions from the server

GetCrashFileNamesAsync ( ) : Task>

Retrieve filenames of crashlog files from storage

HandleExceptionAsync ( Exception ex ) : Task

Handle exception asyncronously

HandleInternalUnhandledException ( Exception unhandledException ) : void

Handle Exceptions that are swallowed because we don't want our SDK crash other apps For internal use by platform SDKs

IdentifyUserAsync ( string email, string appSecret ) : Task

Identify a user by his email-adress (hockeyapp id)

OpenFeedbackThreadAsync ( string threadToken ) : Task

Try to open an existng Feedbackthread

SendCrashesAndDeleteAfterwardsAsync ( ) : Task

Send crash-logs from storage and deletes the if they could be sent

TrackDependency ( DependencyTelemetry telemetry ) : void

Send information about external dependency call in the application.

TrackDependency ( string dependencyName, string commandName, DateTimeOffset startTime, System.TimeSpan duration, bool success ) : void

Send information about external dependency call in the application.

TrackEvent ( EventTelemetry telemetry ) : void

Send an EventTelemetry for display in Diagnostic Search and aggregation in Metrics Explorer.

TrackEvent ( string eventName ) : void

Send a custom event for display in Events tab.

TrackEvent ( string eventName, string>.IDictionary properties = null, double>.IDictionary metrics = null ) : void

Send an event telemetry for display in Diagnostic Search and aggregation in Metrics Explorer.

TrackException ( Exception exception, string>.IDictionary properties = null ) : void

Send an ExceptionTelemetry for display in Diagnostic Search.

TrackMetric ( MetricTelemetry telemetry ) : void

Send a MetricTelemetry for aggregation in Metric Explorer.

TrackMetric ( string name, double value, string>.IDictionary properties = null ) : void

Send a MetricTelemetry for aggregation in Metric Explorer.

TrackPageView ( PageViewTelemetry telemetry ) : void

Send information about the page viewed in the application.

TrackPageView ( string name ) : void

Send information about the page viewed in the application.

TrackTrace ( TraceTelemetry telemetry ) : void

Send a trace message for display in Diagnostic Search.

TrackTrace ( string message ) : void

Send a trace message for display in Diagnostic Search.

TrackTrace ( string message, string>.IDictionary properties ) : void

Send a trace message for display in Diagnostic Search.

TrackTrace ( string message, SeverityLevel severityLevel ) : void

Send a trace message for display in Diagnostic Search.

TrackTrace ( string message, SeverityLevel severityLevel, string>.IDictionary properties ) : void

Send a trace message for display in Diagnostic Search.

Private Methods

Method Description
CreateInitializedContextAsync ( ) : Task
FillEmptyUserAndContactInfo ( string email ) : void
HandleException ( Exception ex ) : void
HockeyClient ( ) : Channel
Initialize ( ) : void

Initializes telemetry client. For performance reasons, this call needs to be performed only after TelemetryConfiguration has been initialized.

IsTelemetryEnabled ( ) : bool

Check to determine if the tracking is enabled.

Track ( ITelemetry telemetry ) : void
TrackException ( ExceptionTelemetry telemetry ) : void

Send an ExceptionTelemetry for display in Diagnostic Search.

TrackRequest ( RequestTelemetry request ) : void

Send information about a request handled by the application.

TrackRequest ( string name, DateTimeOffset startTime, System.TimeSpan duration, string responseCode, bool success ) : void

Send information about a request handled by the application.

WriteTelemetryToDebugOutput ( ITelemetry telemetry ) : void

Method Details

AnyCrashesAvailableAsync() public method

Check for available crash-logs in storage
public AnyCrashesAvailableAsync ( ) : Task
return Task

AuthorizeUserAsync() public method

try to authorize a (hockeayapp) user by email and password
public AuthorizeUserAsync ( string email, string password ) : Task
email string email (hockeyapp user id)
password string password of the user
return Task

CheckForInitialization() public method

Check if this HockeyClient has already been initialized (used internally by platform SDKs)
public CheckForInitialization ( ) : void
return void

CreateCrashData() public method

Create a CrashData object from an Exception with the default CrashLogInformation
public CreateCrashData ( Exception ex ) : ICrashData
ex Exception
return ICrashData

CreateCrashData() public method

Create a CrashData object from an Exception and a given CrashLogInformation
public CreateCrashData ( Exception ex, CrashLogInformation crashLogInfo ) : ICrashData
ex Exception
crashLogInfo CrashLogInformation
return ICrashData

CreateCrashData() public method

create a CrashData object from a logString and stacktrace (used for Unity crashes)
public CreateCrashData ( string logString, string stackTrace ) : ICrashData
logString string
stackTrace string
return ICrashData

CreateNewFeedbackThread() public method

Create a feedback thread to post messages on
public CreateNewFeedbackThread ( ) : IFeedbackThread
return IFeedbackThread

DeleteAllCrashesAsync() public method

Delete all crash-logs from storage
public DeleteAllCrashesAsync ( ) : Task
return Task

Deserialize() public method

Get an ICrashData object from crashlog-stream
public Deserialize ( Stream inputStream ) : ICrashData
inputStream Stream stream from crashlog
return ICrashData

Flush() public method

Clears all buffers for this telemetry stream and causes any buffered data to be written to the underlying channel.
public Flush ( ) : void
return void

GetAppVersionsAsync() public method

Get available app versions from the server
public GetAppVersionsAsync ( ) : Task>
return Task>

GetCrashFileNamesAsync() public method

Retrieve filenames of crashlog files from storage
public GetCrashFileNamesAsync ( ) : Task>
return Task>

HandleExceptionAsync() public method

Handle exception asyncronously
public HandleExceptionAsync ( Exception ex ) : Task
ex Exception the exception that should be saved to a crashlog
return Task

HandleInternalUnhandledException() public method

Handle Exceptions that are swallowed because we don't want our SDK crash other apps For internal use by platform SDKs
public HandleInternalUnhandledException ( Exception unhandledException ) : void
unhandledException Exception the exception to propagate
return void

IdentifyUserAsync() public method

Identify a user by his email-adress (hockeyapp id)
public IdentifyUserAsync ( string email, string appSecret ) : Task
email string email (hockeyapp user id)
appSecret string app secret of the app
return Task

OpenFeedbackThreadAsync() public method

Try to open an existng Feedbackthread
public OpenFeedbackThreadAsync ( string threadToken ) : Task
threadToken string thread token for this thread
return Task

SendCrashesAndDeleteAfterwardsAsync() public method

Send crash-logs from storage and deletes the if they could be sent
public SendCrashesAndDeleteAfterwardsAsync ( ) : Task
return Task

TrackDependency() public method

Send information about external dependency call in the application.
public TrackDependency ( DependencyTelemetry telemetry ) : void
telemetry DependencyTelemetry
return void

TrackDependency() public method

Send information about external dependency call in the application.
public TrackDependency ( string dependencyName, string commandName, DateTimeOffset startTime, System.TimeSpan duration, bool success ) : void
dependencyName string External dependency name.
commandName string Dependency call command name.
startTime DateTimeOffset The time when the dependency was called.
duration System.TimeSpan The time taken by the external dependency to handle the call.
success bool True if the dependency call was handled successfully.
return void

TrackEvent() public method

Send an EventTelemetry for display in Diagnostic Search and aggregation in Metrics Explorer.
public TrackEvent ( EventTelemetry telemetry ) : void
telemetry EventTelemetry An event log item.
return void

TrackEvent() public method

Send a custom event for display in Events tab.
public TrackEvent ( string eventName ) : void
eventName string Event name
return void

TrackEvent() public method

Send an event telemetry for display in Diagnostic Search and aggregation in Metrics Explorer.
public TrackEvent ( string eventName, string>.IDictionary properties = null, double>.IDictionary metrics = null ) : void
eventName string A name for the event.
properties string>.IDictionary Named string values you can use to search and classify events.
metrics double>.IDictionary Measurements associated with this event.
return void

TrackException() public method

Send an ExceptionTelemetry for display in Diagnostic Search.
public TrackException ( Exception exception, string>.IDictionary properties = null ) : void
exception Exception The exception to log.
properties string>.IDictionary Named string values you can use to classify and search for this exception.
return void

TrackMetric() public method

Send a MetricTelemetry for aggregation in Metric Explorer.
public TrackMetric ( MetricTelemetry telemetry ) : void
telemetry MetricTelemetry
return void

TrackMetric() public method

Send a MetricTelemetry for aggregation in Metric Explorer.
public TrackMetric ( string name, double value, string>.IDictionary properties = null ) : void
name string Metric name.
value double Metric value.
properties string>.IDictionary Named string values you can use to classify and filter metrics.
return void

TrackPageView() public method

Send information about the page viewed in the application.
public TrackPageView ( PageViewTelemetry telemetry ) : void
telemetry PageViewTelemetry
return void

TrackPageView() public method

Send information about the page viewed in the application.
public TrackPageView ( string name ) : void
name string Name of the page.
return void

TrackTrace() public method

Send a trace message for display in Diagnostic Search.
public TrackTrace ( TraceTelemetry telemetry ) : void
telemetry TraceTelemetry Message with optional properties.
return void

TrackTrace() public method

Send a trace message for display in Diagnostic Search.
public TrackTrace ( string message ) : void
message string Message to display.
return void

TrackTrace() public method

Send a trace message for display in Diagnostic Search.
public TrackTrace ( string message, string>.IDictionary properties ) : void
message string Message to display.
properties string>.IDictionary Named string values you can use to search and classify events.
return void

TrackTrace() public method

Send a trace message for display in Diagnostic Search.
public TrackTrace ( string message, SeverityLevel severityLevel ) : void
message string Message to display.
severityLevel SeverityLevel Trace severity level.
return void

TrackTrace() public method

Send a trace message for display in Diagnostic Search.
public TrackTrace ( string message, SeverityLevel severityLevel, string>.IDictionary properties ) : void
message string Message to display.
severityLevel SeverityLevel Trace severity level.
properties string>.IDictionary Named string values you can use to search and classify events.
return void