using System;
using LB_VisionProcesses.BarcodeReaders.Huayray;
namespace LB_VisionProcesses.BarcodeReaders
{
///
/// 读码器工厂类
///
public static class BarcodeReaderFactory
{
///
/// 根据品牌创建读码器实例
///
/// 读码器品牌
/// 读码器实例
public static IBarcodeReader CreateReader(BarcodeReaderBrand brand)
{
switch (brand)
{
case BarcodeReaderBrand.Huayray:
return new HRBarcodeReader();
default:
throw new NotSupportedException($"不支持的读码器品牌: {brand}");
}
}
}
}