mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
refactor: convert == null / != null to is null / is not null in 31 files
Replace old-style null comparisons with modern C# pattern matching syntax across Commands, Protocol, Mapping, ChatBots, Physics, Inventory, Logger, CommandHandler, Scripting, Crypto, and other modules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
446c6e7739
commit
c7bc25aa17
31 changed files with 77 additions and 77 deletions
|
|
@ -89,7 +89,7 @@ namespace MinecraftClient.Crypto
|
|||
}
|
||||
|
||||
Span<byte> blockOutput = stackalloc byte[blockSize];
|
||||
if (FastAes != null)
|
||||
if (FastAes is not null)
|
||||
FastAes.EncryptEcb(ReadStreamIV, blockOutput);
|
||||
else
|
||||
Aes!.EncryptEcb(ReadStreamIV, blockOutput, PaddingMode.None);
|
||||
|
|
@ -122,7 +122,7 @@ namespace MinecraftClient.Crypto
|
|||
}
|
||||
|
||||
int processEnd = readed + curRead;
|
||||
if (FastAes != null)
|
||||
if (FastAes is not null)
|
||||
{
|
||||
for (int idx = readed; idx < processEnd; idx++)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ namespace MinecraftClient.Crypto
|
|||
{
|
||||
Span<byte> blockOutput = stackalloc byte[blockSize];
|
||||
|
||||
if (FastAes != null)
|
||||
if (FastAes is not null)
|
||||
FastAes.EncryptEcb(WriteStreamIV, blockOutput);
|
||||
else
|
||||
Aes!.EncryptEcb(WriteStreamIV, blockOutput, PaddingMode.None);
|
||||
|
|
@ -185,7 +185,7 @@ namespace MinecraftClient.Crypto
|
|||
for (int wirtten = 0; wirtten < required; ++wirtten)
|
||||
{
|
||||
ReadOnlySpan<byte> blockInput = new(outputBuf, wirtten, blockSize);
|
||||
if (FastAes != null)
|
||||
if (FastAes is not null)
|
||||
FastAes.EncryptEcb(blockInput, blockOutput);
|
||||
else
|
||||
Aes!.EncryptEcb(blockInput, blockOutput, PaddingMode.None);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue