private void MapToDos(contracts.datamodel.ToDoListe toDoListe) { var toDos = Mapper.Map<IEnumerable<contracts.datamodel.ToDo>, IEnumerable<ToDo>>(toDoListe.ToDos.Where(x => !x.Deleted && !x.Filtered)); sharedState.ToDos.Clear(); foreach (var toDo in toDos) { sharedState.ToDos.Add(toDo); } }
private static Task Map(contracts.Task task) { return new Task { Text = task.Text, Column = task.Column, Position = task.Position, }; }
private static Tweet Map(contracts.Tweet tweet) { return new Tweet { Text = tweet.Text, Veröffentlichen = tweet.Veröffentlichen, AccessToken = tweet.AccessToken, OAuthToken = tweet.OAuthToken }; }
public void Process(contracts.viewmodel.ToDo toDoViewModel) { Trace.TraceInformation("ToDo_Bearbeitung_beginnen.Process"); var toDo = sharedState.ToDos.First(x => x.Id == toDoViewModel.Id); toDo.InBearbeitung = true; Result(sharedState); }
public void Process(contracts.viewmodel.ToDo toDoViewModel) { Trace.TraceInformation("ToDo_Bearbeitung_beenden.Process"); var toDo = sharedState.ToDos.First(x => x.Id == toDoViewModel.Id); Trace.TraceInformation(" Id: {0}", toDo.Id); if (toDo.Erledigt != toDoViewModel.Erledigt) { toDo.Erledigt = toDoViewModel.Erledigt; toDo.Changes = true; } if (toDo.Text != toDoViewModel.Text) { toDo.Text = toDoViewModel.Text; toDo.Changes = true; } if (toDo.Tags != toDoViewModel.Tags) { toDo.Tags = toDoViewModel.Tags; toDo.Changes = true; } toDo.InBearbeitung = false; Result(sharedState); }
public void Speichern(contracts.Tweet tweet) { var dbTweet = Map(tweet); var collection = GetCollection(); collection.Insert(dbTweet); }
public void Save_Task(contracts.Task task) { var dbTask = Map(task); var collection = GetCollection(); collection.Insert(dbTask); }
public void Inject(contracts.datamodel.ToDoListe independent) { datamodel = independent; }
public void Process(contracts.datamodel.ToDoListe toDoListe) { Trace.TraceInformation("ToDo_Liste_in_ViewModel_uebersetzen.Process"); MapToDos(toDoListe); UpdateTags(toDoListe.ToDos.Where(x => !x.Deleted)); }