예제 #1
0
 public static IDependentActivity <int> FromDto(DependentActivityDto dto)
 {
     if (dto == null)
     {
         throw new ArgumentNullException(nameof(dto));
     }
     return(ToDependentActivity(FromDto(dto.Activity), dto.Dependencies, dto.ResourceDependencies));
 }
예제 #2
0
 public static DependentActivityDto Copy(this DependentActivityDto dependentActivityDto)
 {
     if (dependentActivityDto == null)
     {
         throw new ArgumentNullException(nameof(dependentActivityDto));
     }
     return(new DependentActivityDto
     {
         Activity = dependentActivityDto.Activity != null?dependentActivityDto.Activity.Copy() : new ActivityDto()
         {
             TargetResources = new List <int>()
         },
         Dependencies = dependentActivityDto.Dependencies != null?dependentActivityDto.Dependencies.ToList() : new List <int>(),
                            ResourceDependencies = dependentActivityDto.ResourceDependencies != null?dependentActivityDto.ResourceDependencies.ToList() : new List <int>()
     });
 }