Exemple #1
0
 /// <summary>
 /// Sends a telemetry event for specific document using the existing request context
 /// </summary>
 public static void SendTelemetryEvent <T>(RequestContext <T> requestContext, TelemetryProperties telemetryProps)
 {
     Validate.IsNotNull(nameof(requestContext), requestContext);
     Validate.IsNotNull(nameof(telemetryProps), telemetryProps);
     Validate.IsNotNullOrWhitespaceString("telemetryProps.EventName", telemetryProps.EventName);
     Task.Factory.StartNew(async() =>
     {
         await requestContext.SendEvent(TelemetryNotification.Type, new TelemetryParams()
         {
             Params = telemetryProps
         });
     });
 }
Exemple #2
0
 public void SetProperties(TelemetryProperties otherProperties)
 {
     foreach (var prop in otherProperties)
     {
         if (this.ContainsKey(prop.Key))
         {
             this[prop.Key] = prop.Value;
         }
         else
         {
             Add(prop.Key, prop.Value);
         }
     }
 }
Exemple #3
0
 public TelemetryBuilder(TelemetryProperties properties) : base(properties)
 {
 }
Exemple #4
0
 public TelemetryProperties(TelemetryProperties properties) : base(properties)
 {
 }