You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk/core/Azure.Core/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
7
7
- Added `AddClassifier` methods to `RequestContext`. These methods allow callers to change the response classification behavior for a given method invocation.
8
8
- Added type `RequestOptions` to the `Azure` namespace and made `RequestContext` a subclass of `RequestOptions`. This enables `RequestOptions` to be exposed in methods that take `CancellationToken` without causing confusion regarding which cancellation token will take effect.
9
+
- Added the `SetUserAgentString` extension method to `HttpMessage` accepting a `UserAgentValue` and an optional application Id string. This allows assembly specific user agent header information to be set with proper formatting on a per-message basis.
Copy file name to clipboardExpand all lines: sdk/core/Azure.Core/src/HttpMessage.cs
+52-4Lines changed: 52 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,12 @@ namespace Azure.Core
14
14
/// </summary>
15
15
publicsealedclassHttpMessage:IDisposable
16
16
{
17
-
privateDictionary<string,object>?_properties;
17
+
/// <summary>
18
+
/// This dictionary is keyed with <c>Type</c> for a couple of reasons. Primarily, it allows values to be stored such that even if the accessor methods
19
+
/// become public, storing values keyed by internal types make them inaccessible to other assemblies. This protects internal values from being overwritten
20
+
/// by external code. See the <see cref="UserAgentValue"/> and <see cref="UserAgentValueKey"/> types for an example of this usage.
@@ -204,5 +247,10 @@ public override long Position
204
247
set=>throwCreateException();
205
248
}
206
249
}
250
+
251
+
/// <summary>
252
+
/// Exists as a private key entry into the <see cref="HttpMessage._typeProperties"/> dictionary for stashing string keyed entries in the Type keyed dictionary.
thrownewInvalidOperationException($"{nameof(AssemblyInformationalVersionAttribute)} is required on client SDK assembly '{clientAssembly.FullName}' (inferred from the use of options type '{options.GetType().FullName}').");
0 commit comments