public static StartTimeEntryEvent With(TimeEntryStartOrigin origin, ITimeEntry timeEntry)
 => new StartTimeEntryEvent(
     origin,
     string.IsNullOrWhiteSpace(timeEntry.Description),
     timeEntry.ProjectId != null,
     timeEntry.TaskId != null,
     timeEntry.TagIds.Count(),
     timeEntry.Billable,
     timeEntry.IsRunning());
示例#2
0
 public static DateTimeOffset?StopTime(this ITimeEntry timeEntry)
 => timeEntry.IsRunning()
         ? (DateTimeOffset?)null
         : timeEntry.Start + timeEntry.TimeSpanDuration().Value;