public static AgentVersion ToDomainObjectFromDto(AgentVersionDto dto)
        {
            AgentVersion result = new AgentVersion(dto.VersionString);

            result.DownloadLink = dto.DownloadLink;
            result.Id           = dto.Id;
            result.ReleasedDate = dto.ReleasedDate;
            return(result);
        }
Esempio n. 2
0
        public static AgentVersionDto FromDomainObjectToDto(AgentVersion source)
        {
            AgentVersionDto target = new AgentVersionDto();

            target.DownloadLink  = source.DownloadLink;
            target.Id            = source.Id;
            target.ReleasedDate  = source.ReleasedDate;
            target.VersionString = source.VersionString;
            return(target);
        }
Esempio n. 3
0
        public static AvailableAgentVersion FromDtoToDomainObject(AgentVersionDto source)
        {
            AvailableAgentVersion target = new AvailableAgentVersion();

            target.DownloadLink  = source.DownloadLink;
            target.Id            = source.Id;
            target.ReleasedDate  = source.ReleasedDate;
            target.VersionString = source.VersionString;
            return(target);
        }
Esempio n. 4
0
 private void GetLastVersion(object w, DoWorkEventArgs e)
 {
     Thread.Sleep(10000);
     try
     {
         using (VtsWebServiceClient service = new VtsWebServiceClient())
         {
             AgentVersionDto lastAgentVersionDto =
                 service.GetLastAgentVersion();
             AgentVersion lastVersion = AgentVersionAssembler.
                                        ToDomainObjectFromDto(lastAgentVersionDto);
             e.Result = lastVersion;
         }
     }
     catch (Exception ex)
     {
         if (errorCallback != null)
         {
             errorCallback.Invoke(ex, ex.Message);
         }
     }
 }