mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-04-13 20:43:31 +08:00
19 lines
511 B
C#
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),
|
|
};
|
|
}
|
|
}
|