Skip to content

Commit 4355284

Browse files
committed
Convert to new generic JsonStringEnumConverter<TEnum> to fix JSON source generator warning.
InteractionType is used in a JsonSerializerContext. With dotnet/runtime#87224, there is now a warning to convert source generated usages of JsonStringEnumConverter to JsonStringEnumConverter<TEnum>. I went ahead and updated the other 2 usages as well, to make them consistent.
1 parent f9e0324 commit 4355284

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Components/WebAssembly/WebAssembly.Authentication/src/Models/InteractionType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication;
88
/// <summary>
99
/// The type of authentication request.
1010
/// </summary>
11-
[JsonConverter(typeof(JsonStringEnumConverter))]
11+
[JsonConverter(typeof(JsonStringEnumConverter<InteractionType>))]
1212
public enum InteractionType
1313
{
1414
/// <summary>

src/Components/WebAssembly/WebAssembly.Authentication/src/Models/RemoteAuthenticationStatus.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Authentication;
88
/// <summary>
99
/// Represents the status of an authentication operation.
1010
/// </summary>
11-
[JsonConverter(typeof(JsonStringEnumConverter))]
11+
[JsonConverter(typeof(JsonStringEnumConverter<RemoteAuthenticationStatus>))]
1212
public enum RemoteAuthenticationStatus
1313
{
1414
/// <summary>

src/Components/WebAssembly/WebAssembly.Authentication/src/Services/RemoteAuthenticationService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,4 +255,4 @@ internal class RemoteAuthenticationServiceJavaScriptLoggingOptions
255255
}
256256

257257
// Internal for testing purposes
258-
internal record struct InternalAccessTokenResult([property: JsonConverter(typeof(JsonStringEnumConverter))] AccessTokenResultStatus Status, AccessToken Token);
258+
internal record struct InternalAccessTokenResult([property: JsonConverter(typeof(JsonStringEnumConverter<AccessTokenResultStatus>))] AccessTokenResultStatus Status, AccessToken Token);

0 commit comments

Comments
 (0)