예제 #1
0
 public TelemetryPolicy(UserAgentValue userAgentValue)
 {
     _defaultHeader = userAgentValue.ToString();
 }
 /// <summary>
 /// Sets the package name and version portion of the UserAgent telemetry value.
 /// Note: If <see cref="DiagnosticsOptions.IsTelemetryEnabled"/> is false, this value is never used.
 /// </summary>
 /// <param name="message">The <see cref="HttpMessage"/>.</param>
 /// <param name="userAgentValue">The <see cref="SetUserAgentString"/>.</param>
 public static void SetUserAgentString(this HttpMessage message, UserAgentValue userAgentValue)
 {
     message.SetInternalProperty(typeof(UserAgentValueKey), userAgentValue.ToString());
 }