You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
941 B
30 lines
941 B
using Cis.Application.Core.Component.MarkSeacher;
|
|
using EC.Helper.CameraSDK;
|
|
|
|
namespace Cis.Application.Core;
|
|
|
|
[SuppressSniffer]
|
|
public static class Extension
|
|
{
|
|
public static ICameraSDK CreateCameraSDK(this CameraType cameraType, CameraInfo cameraInfo)
|
|
{
|
|
return cameraType switch
|
|
{
|
|
CameraType.HiK => new HiKSDK(cameraInfo),
|
|
CameraType.DaHua => new DaHuaSDK(cameraInfo),
|
|
CameraType.YuShi => new YuShiSDK(cameraInfo),
|
|
_ => null,
|
|
};
|
|
}
|
|
|
|
public static MarkSearcherBase CreateMarkSearcher(this CameraType cameraType, CameraCalcParams cameraCalcParams)
|
|
{
|
|
return cameraType switch
|
|
{
|
|
CameraType.HiK => new HiKMarkSearcher(cameraCalcParams),
|
|
CameraType.DaHua => new DaHuaMarkSearcher(cameraCalcParams),
|
|
CameraType.YuShi => new YuShiMarkSearcher(cameraCalcParams),
|
|
_ => null
|
|
};
|
|
}
|
|
}
|