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