Exemplo n.º 1
0
 public RunDomainEntity Stop(BuildDomainEntity build)
 {
     if (StartedAt == null)
     {
         throw new Exception($"Run not started.");
     }
     EndedAt = DateTime.UtcNow;
     return(this);
 }
Exemplo n.º 2
0
 public RunDomainEntity Start(BuildDomainEntity build)
 {
     if (StartedAt != null || EndedAt != null)
     {
         throw new Exception($"Run already performed.");
     }
     StartedAt = DateTime.UtcNow;
     return(this);
 }