public static CircularDependency <int> FromDto(CircularDependencyDto dto) { if (dto == null) { throw new ArgumentNullException(nameof(dto)); } return(new CircularDependency <int>(dto.Dependencies)); }
public static CircularDependencyDto Copy(this CircularDependencyDto circularDependencyDto) { if (circularDependencyDto == null) { throw new ArgumentNullException(nameof(circularDependencyDto)); } return(new CircularDependencyDto { Dependencies = circularDependencyDto.Dependencies != null?circularDependencyDto.Dependencies.ToList() : new List <int>() }); }