fix: Adds optimized formatter for clilocs (#1045)

Adds an optimized formatter for localization. Example:
```cs
string localizationText = Localization.Format(1050039, "enu", $"{m_Amount}\t{LabelNumber:#}");
```

Fixes #1044
This commit is contained in:
Kamron Batman 2022-06-04 11:53:32 -07:00 committed by GitHub
parent ecbee17690
commit 5f00330a66
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 248 additions and 53 deletions

View file

@ -4,6 +4,7 @@ using Xunit;
namespace Server.Tests.Tests.Buffers;
[Collection("Sequential Tests")]
public class STArrayPoolTests
{
[Theory]
@ -48,7 +49,7 @@ public class STArrayPoolTests
weakReferences1[i] = new WeakReference(arrays1[i]);
arrays2[i] = STArrayPool<byte>.Shared.Rent(64);
weakReferences2[i] = new WeakReference(arrays1[i]);
weakReferences2[i] = new WeakReference(arrays2[i]);
}
for (var i = 0; i < arrays1.Length; i++)