Example #1
0
 public void AddDevice(ApiDeviceClientResponseModel item)
 {
     if (!this.Devices.Any(x => x.Id == item.Id))
     {
         this.Devices.Add(item);
     }
 }
        public virtual ApiDeviceClientRequestModel MapClientResponseToRequest(
            ApiDeviceClientResponseModel response)
        {
            var request = new ApiDeviceClientRequestModel();

            request.SetProperties(
                response.DateOfLastPing,
                response.IsActive,
                response.Name,
                response.PublicId);
            return(request);
        }
        public virtual ApiDeviceClientResponseModel MapClientRequestToResponse(
            int id,
            ApiDeviceClientRequestModel request)
        {
            var response = new ApiDeviceClientResponseModel();

            response.SetProperties(id,
                                   request.DateOfLastPing,
                                   request.IsActive,
                                   request.Name,
                                   request.PublicId);
            return(response);
        }
 public void SetDeviceIdNavigation(ApiDeviceClientResponseModel value)
 {
     this.DeviceIdNavigation = value;
 }