public static TaskResultModel ToModel(this TaskResultDto result) { if (result == null) { return(null); } return(new TaskResultModel { AdditionalExploitConditions = result.AdditionalExploitConditions, Description = result.Description, ExploitGraph = result.ExploitGraph, File = result.File, Function = result.Function, Id = result.Id, IssueNumber = result.IssueNumber, IssueUrl = result.IssueUrl, LineNumber = result.LineNumber, LinePosition = result.LinePosition, Message = result.Message, Place = result.Place, Rawline = result.Rawline, SeverityType = result.SeverityType, SourceFile = result.SourceFile, TaskId = result.TaskId, Type = result.Type, TypeShort = result.TypeShort }); }
public static BookResultViewModel ToBookListViewModel(this TaskResultDto task) { return(new BookResultViewModel { BookResults = task.Tasks.ToBookTimeViewModel(), Total = task.Total }); }
public static TaskResultModel ToModel(this TaskResultDto taskResultDto) { if (taskResultDto == null) { throw new ArgumentNullException(nameof(taskResultDto)); } return(new TaskResultModel { Description = taskResultDto.Description, Name = taskResultDto.Name, Suffix = taskResultDto.Suffix, Time = taskResultDto.Time, Type = taskResultDto.Type, Value = taskResultDto.Value, InputSize = taskResultDto.InputSize, Outliers = taskResultDto.Outliers.Select(dto => dto.ToModel()).ToList(), Statistics = taskResultDto.Statistics.ToModel() }); }