-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make FluentCore AOT compatible (use source generation for JsonSeriali…
…zer) (#38) * Use source generation for Json serailization in Authentication * Add source generation context for ClientJsonObject * Add json source generation for installers * Add json source generation for Resources * Add json source generation for MinecraftInstance and Launch * Use JsonObject instead of anonymous type in CurseForgeClient * Add OptiFine client.json source generation * Clean up csproj
- Loading branch information
Showing
19 changed files
with
267 additions
and
106 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Natsurainko.FluentCore/Authentication/AuthenticationJsonSerializerContext.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Text.Json.Serialization; | ||
using System.Threading.Tasks; | ||
|
||
namespace Nrk.FluentCore.Authentication; | ||
|
||
[JsonSerializable(typeof(XBLAuthenticateRequest))] | ||
[JsonSerializable(typeof(XBLAuthenticateResponse))] | ||
[JsonSerializable(typeof(XSTSAuthenticateRequest))] | ||
[JsonSerializable(typeof(XSTSAuthenticateErrorModel))] | ||
[JsonSerializable(typeof(XSTSAuthenticateResponse))] | ||
[JsonSerializable(typeof(MicrosoftAuthenticationResponse))] | ||
[JsonSerializable(typeof(OAuth2DeviceCodeResponse))] | ||
[JsonSerializable(typeof(OAuth2TokenResponse))] | ||
[JsonSerializable(typeof(YggdrasilLoginRequest))] | ||
[JsonSerializable(typeof(YggdrasilRefreshRequest))] | ||
[JsonSerializable(typeof(YggdrasilResponseModel))] | ||
internal partial class AuthenticationJsonSerializerContext : JsonSerializerContext | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.