mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-25 22:29:47 +08:00
* 多语言下拉框挪到其他设置下 * 使用正经的Fixture写法,杜绝并行测试时paddle崩溃的问题 * 适配不同主城的合成台的不同法语名 * 修正语言资源的正则表达式,好久没用了写错了好多;为AutoDomainTask新增的“地脉异常”、“点击任意位置关闭”添加多语言适配
26 lines
838 B
C#
26 lines
838 B
C#
using BetterGenshinImpact.Core.Recognition.OCR;
|
|
using System;
|
|
using System.Collections.Concurrent;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BetterGenshinImpact.UnitTest.CoreTests.RecognitionTests.OCRTests
|
|
{
|
|
[CollectionDefinition("Paddle Collection")]
|
|
public class PaddleCollection : ICollectionFixture<PaddleFixture>
|
|
{
|
|
}
|
|
|
|
public class PaddleFixture
|
|
{
|
|
private readonly ConcurrentDictionary<string, PaddleOcrService> paddleOcrServices = new ConcurrentDictionary<string, PaddleOcrService>();
|
|
|
|
public PaddleOcrService Get(string cultureInfoName = "zh-Hans")
|
|
{
|
|
return paddleOcrServices.GetOrAdd(cultureInfoName, name => { lock (paddleOcrServices) { return new PaddleOcrService(name); } });
|
|
}
|
|
}
|
|
}
|