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