Files
better-genshin-impact/BetterGenshinImpact/Core/Recognition/OCR/OcrFactory.cs
2024-04-12 10:38:50 +08:00

19 lines
511 B
C#

using System;
namespace BetterGenshinImpact.Core.Recognition.OCR;
public class OcrFactory
{
// public static IOcrService Media = Create(OcrEngineTypes.Media);
public static IOcrService Paddle { get; } = Create(OcrEngineTypes.Paddle);
public static IOcrService Create(OcrEngineTypes type)
{
return type switch
{
OcrEngineTypes.Paddle => new PaddleOcrService(),
_ => throw new ArgumentOutOfRangeException(nameof(type), type, null),
};
}
}