using EC.App.Entity.Onvif; using EC.App.ThatBLL.Onvif.Impl; using EC.Onvif; namespace EC.App.ThatBLL.Onvif { public class MediaBLL : IMediaBLL { private readonly OnvifClientService _ocService; public MediaBLL(OnvifClientService onvifClientService) { _ocService = onvifClientService; } #region Operate public bool IsConnected(string ip) { bool flag = _ocService.TryGet(ip, out OnvifClient onvifClient); bool ret = flag && onvifClient.IsMediaContected(); return ret; } #endregion Operate } }