forked from fajiao/OnvifServer-CSharp
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.
46 lines
849 B
46 lines
849 B
using EC.App.Core;
|
|
using EC.App.Entity.Onvif;
|
|
using EC.Onvif;
|
|
using Furion.DependencyInjection;
|
|
|
|
namespace EC.App.ThatService.Onvif
|
|
{
|
|
public class OnvifClientService : IService, ISingleton
|
|
{
|
|
private readonly OnvifClientDict _dict = new OnvifClientDict();
|
|
|
|
public OnvifClientService()
|
|
{
|
|
}
|
|
|
|
public bool TryAdd(string key, OnvifClient value)
|
|
{
|
|
bool ret = _dict.TryAdd(key, value);
|
|
return ret;
|
|
}
|
|
|
|
public bool Remove(string key)
|
|
{
|
|
bool ret = _dict.Remove(key);
|
|
return ret;
|
|
}
|
|
|
|
public bool TryUpdate(string key, OnvifClient value)
|
|
{
|
|
bool ret = _dict.TryUpdate(key, value);
|
|
return ret;
|
|
}
|
|
|
|
public bool TryGet(string key, out OnvifClient value)
|
|
{
|
|
bool ret = _dict.TryGet(key, out value);
|
|
return ret;
|
|
}
|
|
|
|
public bool IsExist(string key)
|
|
{
|
|
bool ret = _dict.IsExist(key);
|
|
return ret;
|
|
}
|
|
}
|
|
}
|