コード例 #1
0
 private async Task <ITimeEntry> createTimeEntry(ITimeEntriesApi api, IUser user, DateTimeOffset start, long?duration, bool billable)
 => await api.Create(new Models.TimeEntry
 {
     At          = start,
     Description = Guid.NewGuid().ToString(),
     Start       = start,
     Duration    = duration,
     UserId      = user.Id,
     WorkspaceId = user.DefaultWorkspaceId.Value,
     TagIds      = new long[0],
     Billable    = billable
 });
コード例 #2
0
 private async Task <ITimeEntry> createTimeEntry(ITimeEntriesApi api, IUser user, DateTimeOffset at, long?duration, bool billable = false, long?projectId = null)
 => await api.Create(new TimeEntry
 {
     At          = at,
     Description = Guid.NewGuid().ToString(),
     Start       = at,
     Duration    = duration,
     UserId      = user.Id,
     WorkspaceId = user.DefaultWorkspaceId.Value,
     TagIds      = new long[0],
     Billable    = billable,
     ProjectId   = projectId
 });