Exemple #1
0
 public TaskProgression()
 {
     this.TaskStateChanges            = this.WhenAnyValue(m => m.State);
     this.DetailsChanges              = this.WhenAnyValue(m => m.Details);
     this.TitleChanges                = this.WhenAnyValue(m => m.Title);
     this.CurrentProgressChanges      = this.WhenAnyValue(m => m.CurrentProgress);
     this.RequiredProgressChanges     = this.WhenAnyValue(m => m.RequiredProgress);
     this.ErrorChanges                = this.WhenAnyValue(m => m.Error);
     this.TaskProgressionStateChanges = this.WhenAnyValue(
         m => m.State,
         m => m.Details,
         m => m.CurrentProgress,
         m => m.RequiredProgress)
                                        .Select((items) => new TaskProgressionState(items.Item1, items.Item2, items.Item3, items.Item4));
     this.DoneChanges = TaskStateChanges.Where(state => state.IsIn(TaskState.Done, TaskState.Failed));
 }
Exemple #2
0
 public TaskProgression()
 {
     TaskStateChanges            = this.WhenAnyValue(m => m.State);
     DetailsChanges              = this.WhenAnyValue(m => m.Details);
     TitleChanges                = this.WhenAnyValue(m => m.Title);
     CurrentProgressChanges      = this.WhenAnyValue(m => m.CurrentProgress);
     RequiredProgressChanges     = this.WhenAnyValue(m => m.RequiredProgress);
     ErrorChanges                = this.WhenAnyValue(m => m.Error);
     TaskProgressionStateChanges =
         this.WhenAnyValue(
             m => m.Title,
             m => m.State,
             m => m.Details,
             m => m.CurrentProgress,
             m => m.RequiredProgress,
             m => m.Error,
             (t, s, d, c, r, e) => new TaskProgressionState(t, s, d, c, r, e));
     DoneChanges = TaskStateChanges.Where(state => state.IsIn(TaskState.Done, TaskState.Failed));
 }