mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Modernize null-check patterns: use 'is null' and 'is not null'
Replace '== null' with 'is null' and '!= null' with 'is not null' across 19 core files following modern C# pattern matching conventions. Only literal null comparisons are changed. Assignments, value comparisons, and LINQ expressions are left untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
902e944cbb
commit
c5df6a49c6
19 changed files with 111 additions and 111 deletions
|
|
@ -925,7 +925,7 @@ namespace MinecraftClient.Protocol
|
|||
int code = DoHTTPSPost("authserver.mojang.com", 443, "/refresh", json_request, ref result);
|
||||
if (code == 200)
|
||||
{
|
||||
if (result == null)
|
||||
if (result is null)
|
||||
{
|
||||
return LoginResult.NullError;
|
||||
}
|
||||
|
|
@ -976,7 +976,7 @@ namespace MinecraftClient.Protocol
|
|||
Config.Main.General.AuthServer.UseHttps, ref result);
|
||||
if (code == 200)
|
||||
{
|
||||
if (result == null)
|
||||
if (result is null)
|
||||
{
|
||||
return LoginResult.NullError;
|
||||
}
|
||||
|
|
@ -1251,7 +1251,7 @@ namespace MinecraftClient.Protocol
|
|||
contentType = header.Value;
|
||||
}
|
||||
|
||||
if (body != null)
|
||||
if (body is not null)
|
||||
request.Content = new StringContent(body, Encoding.UTF8, contentType);
|
||||
|
||||
if (Settings.Config.Logging.DebugMessages)
|
||||
|
|
@ -1279,9 +1279,9 @@ namespace MinecraftClient.Protocol
|
|||
}
|
||||
}
|
||||
}, TimeSpan.FromSeconds(30));
|
||||
if (postResult != null)
|
||||
if (postResult is not null)
|
||||
result = postResult;
|
||||
if (exception != null)
|
||||
if (exception is not null)
|
||||
throw exception;
|
||||
return statusCode;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue