コード例 #1
0
 public static CircularDependency <int> FromDto(CircularDependencyDto dto)
 {
     if (dto == null)
     {
         throw new ArgumentNullException(nameof(dto));
     }
     return(new CircularDependency <int>(dto.Dependencies));
 }
コード例 #2
0
 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>()
     });
 }