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: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,7 @@ Represents the **NuGet** versions.
10
10
-*Fixed*: Validation extensions `Exists` and `ExistsAsync` which expect a non-null resultant value have been renamed to `ValueExists` and `ValueExistsAsync` to improve usability; also they are `IResult` aware and will act accordingly.
11
11
-*Fixed*: The `ETag` HTTP handling has been updated to correctly output and expect the weak `W/"xxxx"` format.
12
12
-*Fixed*: The `ETagGenerator` implementation has been further optimized to minimize unneccessary string allocations.
13
+
-*Fixed*: The `ValueContentResult` will only generate a response header ETag (`ETagGenerator`) for a `GET` or `HEAD` request. The underlying result `IETag.ETag` is used as-is where there is no query string; otherwise, generates as assumes query string will alter result (i.e. filtering, paging, sorting, etc.). The result `IETag.ETag` is unchanged so the consumer can still use as required for a further operation.
13
14
-*Fixed*: The `SettingsBase` has been optimized. The internal recursion checking has been removed and as such an endless loop (`StackOverflowException`) may occur where misconfigured; given frequency of `IConfiguration` usage the resulting performance is deemed more important. Additionally, `prefixes` are now optional.
14
15
- The existing support of referencing a settings property by name (`settings.GetValue<T>("NamedProperty")`) and it using reflection to find before querying the `IConfiguration` has been removed. This was not a common, or intended usage, and was somewhat magical, and finally was non-performant.
returnnewConcurrencyException($"An 'If-Match' header is required for an HTTP {wap.Request.Method} where the underlying entity supports concurrency (ETag).");
Copy file name to clipboardexpand all lines: src/CoreEx/Abstractions/ETagGenerator.cs
+14-2
Original file line number
Diff line number
Diff line change
@@ -90,10 +90,22 @@ public static class ETagGenerator
90
90
}
91
91
92
92
/// <summary>
93
-
/// Parses an <see cref="IETag.ETag"/> by removing double quotes character bookends; for example '<c>"abc"</c>' would be formatted as '<c>abc</c>'.
93
+
/// Parses an <see cref="IETag.ETag"/> by removing any weak prefix ('<c>W/</c>') double quotes character bookends; for example '<c>"abc"</c>' would be formatted as '<c>abc</c>'.
94
94
/// </summary>
95
95
/// <param name="etag">The <see cref="IETag.ETag"/> to unformat.</param>
96
96
/// <returns>The unformatted value.</returns>
97
-
publicstaticstring?ParseETag(string?etag)=>etagis not null&&etag.Length>1&&etag.StartsWith("\"",StringComparison.InvariantCultureIgnoreCase)&&etag.EndsWith("\"",StringComparison.InvariantCultureIgnoreCase)?etag[1..^1]:etag;
Copy file name to clipboardexpand all lines: src/CoreEx/ExecutionContext.cs
+3-10
Original file line number
Diff line number
Diff line change
@@ -132,7 +132,7 @@ public static object GetRequiredService(Type type)
132
132
/// <summary>
133
133
/// Gets the <see cref="ServiceProvider"/>.
134
134
/// </summary>
135
-
/// <remarks>This is automatically set via the <see cref="Microsoft.Extensions.DependencyInjection.IServiceCollectionExtensions.AddExecutionContext(IServiceCollection, Func{IServiceProvider, ExecutionContext}?)"/>.</remarks>
135
+
/// <remarks>This is automatically set via the <see cref="IServiceCollectionExtensions.AddExecutionContext(IServiceCollection, Func{IServiceProvider, ExecutionContext}?)"/>.</remarks>
136
136
publicIServiceProvider?ServiceProvider{get;set;}
137
137
138
138
/// <summary>
@@ -151,11 +151,6 @@ public static object GetRequiredService(Type type)
151
151
/// </summary>
152
152
publicboolIsTextSerializationEnabled{get;set;}
153
153
154
-
/// <summary>
155
-
/// Gets or sets the <b>result</b> entity tag (used where the value does not explicitly implement <see cref="IETag"/>).
156
-
/// </summary>
157
-
publicstring?ResultETag{get;set;}
158
-
159
154
/// <summary>
160
155
/// Gets or sets the corresponding user name.
161
156
/// </summary>
@@ -202,15 +197,14 @@ public virtual ExecutionContext CreateCopy()
202
197
{
203
198
varec=Create==null?thrownewInvalidOperationException($"The {nameof(Create)} function must not be null to create a copy."):Create();
0 commit comments