Skip to content

Commit

Permalink
优化代码,更新版本号
Browse files Browse the repository at this point in the history
  • Loading branch information
YangSpring114 committed Mar 16, 2024
1 parent eccae8e commit 34d8dfe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace MinecraftLaunch.Components.Authenticator;

public sealed class MicrosoftAuthenticator(string clientId, bool isCheckOwnership) : IAuthenticator<MicrosoftAccount> {
public sealed class MicrosoftAuthenticator(string clientId, bool isCheckOwnership = true) : IAuthenticator<MicrosoftAccount> {
private readonly MicrosoftAccount _account;
private readonly string _clientId = clientId;
private OAuth2TokenResponse _oAuth2TokenResponse;
Expand All @@ -21,7 +21,7 @@ public MicrosoftAuthenticator(MicrosoftAccount account, string clientId, bool is

public MicrosoftAccount Authenticate() {
var task = AuthenticateAsync();
if (task.IsCompleted) {
if (task is { IsFaulted: false, IsCompleted: true }) {
return task.GetAwaiter().GetResult();
}

Expand Down
2 changes: 1 addition & 1 deletion MinecraftLaunch/MinecraftLaunch.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>3.0.02</Version>
<Version>3.0.03</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down

0 comments on commit 34d8dfe

Please sign in to comment.