-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
de59f50
commit 1c05744
Showing
4 changed files
with
86 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using ParallelPipelines.Domain.Entities; | ||
using ParallelPipelines.Domain.Enums; | ||
|
||
namespace ParallelPipelines.Application; | ||
|
||
public class PipelineSummaryDto | ||
{ | ||
public CompletionType? OverallCompletionType { get; set; } | ||
public DateTimeOffset? DeploymentStartTime; | ||
public DateTimeOffset? DeploymentEndTime; | ||
public List<StepContainerDto> StepContainers { get; set; } = []; | ||
} | ||
|
||
public static class PipelineSummaryMapper | ||
{ | ||
public static PipelineSummaryDto ToDto(PipelineSummary pipelineSummary) | ||
{ | ||
return new PipelineSummaryDto | ||
{ | ||
OverallCompletionType = pipelineSummary.OverallCompletionType, | ||
DeploymentStartTime = pipelineSummary.DeploymentStartTime, | ||
DeploymentEndTime = pipelineSummary.DeploymentEndTime, | ||
StepContainers = pipelineSummary.StepContainers.Select(StepContainerMapper.ToDto).ToList() | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using ParallelPipelines.Domain.Entities; | ||
using ParallelPipelines.Domain.Enums; | ||
|
||
namespace ParallelPipelines.Application; | ||
|
||
public class StepContainerDto | ||
{ | ||
public string? StepName { get; set; } | ||
public CompletionType? CompletionType { get; set; } | ||
public DateTimeOffset? StartTime { get; set; } | ||
public DateTimeOffset? EndTime { get; set; } | ||
} | ||
|
||
public static class StepContainerMapper | ||
{ | ||
public static StepContainerDto ToDto(StepContainer stepContainer) | ||
{ | ||
return new StepContainerDto | ||
{ | ||
StepName = stepContainer.GetStepName(), | ||
CompletionType = stepContainer.CompletionType, | ||
StartTime = stepContainer.StartTime, | ||
EndTime = stepContainer.EndTime | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters