Пример #1
0
        public static DTO.BackupItemType ToDTO(this BackupItemType source)
        {
            var h = new DTO.BackupItemType();

            h.IsEnabled = source.IsEnabled;
            h.ItemGroup = source.ItemGroup;
            h.ItemName  = source.ItemName;
            if (source.Task != null)
            {
                h.Task = source.Task.ToDTO();
            }
            if (source.Path != null)
            {
                h.Path = source.Path.ConvertAll(wld => wld.ToDTO()).ToArray();
            }
            return(h);
        }
Пример #2
0
        public static BackupItemType FromDTO(this DTO.BackupItemType source)
        {
            var h = new BackupItemType();

            h.IsEnabled = source.IsEnabled;
            h.ItemGroup = source.ItemGroup;
            h.ItemName  = source.ItemName;
            if (source.Task != null)
            {
                h.Task = source.Task.FromDTO();
            }
            if (source.Path != null)
            {
                h.Path = source.Path.Select(wld => wld.FromDTO()).ToList();
            }
            return(h);
        }
Пример #3
0
 public static DTO.BackupItemType ToDTO(this BackupItemType source)
 {
     var h = new DTO.BackupItemType();
     h.IsEnabled = source.IsEnabled;
     h.ItemGroup = source.ItemGroup;
     h.ItemName = source.ItemName;
     if (source.Task != null)
         h.Task = source.Task.ToDTO();
     if (source.Path != null)
         h.Path = source.Path.ConvertAll(wld => wld.ToDTO()).ToArray();
     return h;
 }