示例#1
0
        public GetCameraSnapshotResponse GetCameraSnapshot(GetCameraSnapshotRequest request)
        {
            try
            {
                if (request == null)
                {
                    throw new ArgumentNullException("request");
                }

                GetCameraSnapshotResponse response = new GetCameraSnapshotResponse();

                response.Snapshot = Locator.Get <IStreamingManager>().GetCameraSnapshot(request.CameraId);

                return(response);
            }
            catch (Exception ex)
            {
                throw new FaultException <DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message);
            }
        }
        public GetCameraSnapshotResponse GetCameraSnapshot(GetCameraSnapshotRequest request)
        {
            try
              {
            if (request == null)
              throw new ArgumentNullException("request");

            GetCameraSnapshotResponse response = new GetCameraSnapshotResponse();

            response.Snapshot = Locator.Get<IStreamingManager>().GetCameraSnapshot(request.CameraId);

            return response;
              }
              catch (Exception ex)
              {
            throw new FaultException<DeviceConnectorServiceFault>(new DeviceConnectorServiceFault(ex.Message, ex), ex.Message);
              }
        }