using EC.App.ThatBLL.Onvif.Intf; using EC.App.ThatService.Onvif; using EC.Onvif; namespace EC.App.ThatBLL.Onvif { public class DeviceBLL : IDeviceBLL { private readonly OnvifClientService _ocService; public DeviceBLL(OnvifClientService onvifClientService) { _ocService = onvifClientService; } public bool IsConnected(string ip) { bool flag = _ocService.TryGet(ip, out OnvifClient onvifClient); bool ret = flag && onvifClient.IsDeviceContected(); return ret; } } }