private static void CopyProjectContainerMembersFromViewModelToModel(ProjectItemContainerModel model, ProjectItemContainerViewModel viewModel)
 {
     model.Id = viewModel.Id;
     model.ProjectId = viewModel.ProjectId;
     model.Name = viewModel.Name;
     model.LastModified = viewModel.LastModified;
     //model.Children = new List<IProjectItemModel>();
     foreach (var childViewModel in viewModel.Children)
     {
         IProjectItemModel childModel = null;
         if (childViewModel is ProjectDirectoryViewModel)
         {
             childModel = FromViewModelToModel((ProjectDirectoryViewModel)childViewModel);
         }
         else if (childViewModel is ProjectFileViewModel)
         {
             childModel = FromViewModelToModel((ProjectFileViewModel)childViewModel);
         }
         model.Children.Add(childModel);
     }
 }
 private static void CopyProjectContainerMembersFromModelToViewModel(ProjectItemContainerViewModel viewModel, ProjectItemContainerModel model)
 {
     viewModel.Id           = model.Id;
     viewModel.ProjectId    = model.ProjectId;
     viewModel.Name         = model.Name;
     viewModel.LastModified = model.LastModified;
     //viewModel.Children = new ObservableCollection<IProjectItemViewModel>();
     foreach (var childModel in model.Children)
     {
         IProjectItemViewModel childViewModel = null;
         if (childModel is ProjectDirectoryDto)
         {
             childViewModel = FromModelToViewModel((ProjectDirectoryDto)childModel);
         }
         else if (childModel is ProjectFileDto)
         {
             childViewModel = FromModelToViewModel((ProjectFileDto)childModel);
         }
         viewModel.InitialChildren.Add(childViewModel);
     }
 }
 private static void CopyProjectContainerMembersFromModelToViewModel(ProjectItemContainerViewModel viewModel, ProjectItemContainerModel model)
 {
     viewModel.Id = model.Id;
     viewModel.ProjectId = model.ProjectId;
     viewModel.Name = model.Name;
     viewModel.LastModified = model.LastModified;
     //viewModel.Children = new ObservableCollection<IProjectItemViewModel>();
     foreach (var childModel in model.Children)
     {
         IProjectItemViewModel childViewModel = null;
         if (childModel is ProjectDirectoryDto)
         {
             childViewModel = FromModelToViewModel((ProjectDirectoryDto)childModel);
         }
         else if (childModel is ProjectFileDto)
         {
             childViewModel = FromModelToViewModel((ProjectFileDto)childModel);
         }
         viewModel.InitialChildren.Add(childViewModel);
     }
 }
 private static void CopyProjectContainerMembersFromViewModelToModel(ProjectItemContainerModel model, ProjectItemContainerViewModel viewModel)
 {
     model.Id           = viewModel.Id;
     model.ProjectId    = viewModel.ProjectId;
     model.Name         = viewModel.Name;
     model.LastModified = viewModel.LastModified;
     //model.Children = new List<IProjectItemModel>();
     foreach (var childViewModel in viewModel.Children)
     {
         IProjectItemModel childModel = null;
         if (childViewModel is ProjectDirectoryViewModel)
         {
             childModel = FromViewModelToModel((ProjectDirectoryViewModel)childViewModel);
         }
         else if (childViewModel is ProjectFileViewModel)
         {
             childModel = FromViewModelToModel((ProjectFileViewModel)childViewModel);
         }
         model.Children.Add(childModel);
     }
 }