DefaultTelemetryContext Class
Definition
An IDefaultTelemetryContext that contains all required parameters set to their default values.
public sealed class DefaultTelemetryContextInheritance object
Constructors
DefaultTelemetryContext(ConfigurationData)
Initializes a new instance of the DefaultTelemetryContext class.
public DefaultTelemetryContext(ConfigurationData configuration)Parameters
configuration ConfigurationData
ConfigurationData object to build the list of context properties from.
Methods
SetContextProperty(TrackerType, string, object)
Sets the value of a context property for all tracker types specified. If the property does not already exist, it will be created.
public void SetContextProperty(TrackerType trackerType, string name, object value)Parameters
trackerType TrackerType
The tracker types for which to set this context property.
name string
The name of the context property to set.
value object
The value the context property should be set to.
RemoveContextProperty(TrackerType, string)
Attempts to remove a context property for each of the specified tracker types.
public void RemoveContextProperty(TrackerType trackerType, string name)Parameters
trackerType TrackerType
The tracker types for which to remove the context property.
name string
The name of the context property to remove.
GetContextProperties(TrackerType)
Gets all context properties for each tracker type specified.
public IDictionary<TrackerType, IDictionary<string, object>> GetContextProperties(TrackerType trackerType)Parameters
trackerType TrackerType
The tracker types for which to get the context properties of.
Returns
IDictionary<TrackerType, IDictionary<string, object>>
Returns a Dictionary of Dictionaries of context properties for multiple tracker types.