Smoothed download bar, fixed many warnings
This commit is contained in:
@@ -46,7 +46,7 @@ public static class Crypto
|
||||
return hash;
|
||||
|
||||
return _hashListPlayersSHA256[playerToHash] =
|
||||
BitConverter.ToString(_sha256CryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(playerToHash.Item1 + playerToHash.Item2.ToString()))).Replace("-", "", StringComparison.Ordinal);
|
||||
Convert.ToHexString(_sha256CryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(playerToHash.Item1 + playerToHash.Item2.ToString())));
|
||||
}
|
||||
|
||||
public static string GetHash256(this string stringToHash)
|
||||
@@ -60,7 +60,7 @@ public static class Crypto
|
||||
return hash;
|
||||
|
||||
return _hashListSHA256[stringToCompute] =
|
||||
BitConverter.ToString(_sha256CryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(stringToCompute))).Replace("-", "", StringComparison.Ordinal);
|
||||
Convert.ToHexString(_sha256CryptoProvider.ComputeHash(Encoding.UTF8.GetBytes(stringToCompute)));
|
||||
}
|
||||
#pragma warning restore SYSLIB0021 // Type or member is obsolete
|
||||
}
|
||||
@@ -57,10 +57,9 @@ public static class SeStringUtils
|
||||
continue;
|
||||
|
||||
var hasColor = fragment.Color.HasValue;
|
||||
Vector4 color = default;
|
||||
if (hasColor)
|
||||
{
|
||||
color = fragment.Color!.Value;
|
||||
Vector4 color = fragment.Color!.Value;
|
||||
builder.PushColorRgba(color);
|
||||
}
|
||||
|
||||
@@ -233,7 +232,7 @@ public static class SeStringUtils
|
||||
protected abstract byte ChunkType { get; }
|
||||
}
|
||||
|
||||
private class ColorPayload : AbstractColorPayload
|
||||
private sealed class ColorPayload : AbstractColorPayload
|
||||
{
|
||||
protected override byte ChunkType => 0x13;
|
||||
|
||||
@@ -247,12 +246,12 @@ public static class SeStringUtils
|
||||
public ColorPayload(Vector4 color) : this(new Vector3(color.X, color.Y, color.Z)) { }
|
||||
}
|
||||
|
||||
private class ColorEndPayload : AbstractColorEndPayload
|
||||
private sealed class ColorEndPayload : AbstractColorEndPayload
|
||||
{
|
||||
protected override byte ChunkType => 0x13;
|
||||
}
|
||||
|
||||
private class GlowPayload : AbstractColorPayload
|
||||
private sealed class GlowPayload : AbstractColorPayload
|
||||
{
|
||||
protected override byte ChunkType => 0x14;
|
||||
|
||||
@@ -266,7 +265,7 @@ public static class SeStringUtils
|
||||
public GlowPayload(Vector4 color) : this(new Vector3(color.X, color.Y, color.Z)) { }
|
||||
}
|
||||
|
||||
private class GlowEndPayload : AbstractColorEndPayload
|
||||
private sealed class GlowEndPayload : AbstractColorEndPayload
|
||||
{
|
||||
protected override byte ChunkType => 0x14;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user