public KeepPublishedCameraAliveResponse KeepPublishedCameraAlive(KeepPublishedCameraAliveRequest request) { try { if (request == null) { throw new ArgumentNullException("request"); } KeepPublishedCameraAliveResponse response = new KeepPublishedCameraAliveResponse(); Locator.Get <IStreamingManager>().KeepAlive(request.CameraId, PublishedCameraTranslator.Translate(request.Destination)); return(response); } catch (Exception ex) { throw new FaultException <DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message); } }
public GetPublishedCamerasResponse GetPublishedCameras(GetPublishedCamerasRequest request) { try { if (request == null) { throw new ArgumentNullException("request"); } GetPublishedCamerasResponse response = new GetPublishedCamerasResponse(); response.PublishedCameras = new PublishedCameraDataCollection(); IList <PublishedCamera> list = Locator.Get <IStreamingManager>().GetPublishedCameras(); response.PublishedCameras.AddRange((from c in list select PublishedCameraTranslator.Translate(c)).ToList()); return(response); } catch (Exception ex) { throw new FaultException <DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message); } }