public static IDependentActivity <int> FromDto(DependentActivityDto dto) { if (dto == null) { throw new ArgumentNullException(nameof(dto)); } return(ToDependentActivity(FromDto(dto.Activity), dto.Dependencies, dto.ResourceDependencies)); }
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>() }); }