Ejemplo n.º 1
0
 public TimeTrackingManager(UserDefinedSettings settings, Workflow.Workflow workflow)
 {
     Settings                        = settings;
     TimeTrackingOperator            = new TimeTrackingOperator(Settings);
     workflow.PreLoadSystemNotes    += () => PreLoadTotalTime?.Invoke();
     workflow.FailedLoadSystemNotes += () => FailedLoadTotalTime?.Invoke();
     workflow.PostLoadSystemNotes   +=
         (state, notes) => processSystemNotes(state.MergeRequestDescriptor, state.CurrentUser, notes);
 }
Ejemplo n.º 2
0
        async public Task AddSpanAsync(bool add, TimeSpan span, MergeRequestDescriptor mrd)
        {
            await TimeTrackingOperator.AddSpanAsync(add, span, mrd);

            if (add)
            {
                MergeRequestTimes[mrd] += span;
            }
            else
            {
                MergeRequestTimes[mrd] -= span;
            }
        }