public MatchViewModel() { Match fake = new Match(); fake.Id = "a"; fake.Person = new Person(); fake.Person.Name = "NAme"; fake.CreatedDate = "1/1/2014"; fake.Closed = true; _data = fake; }
internal void Update(Match[] matches) { lock (_matches) { foreach (var match in matches) { var existingMatch = _matches.FirstOrDefault(a => a.Data.Id == match.Id); if (existingMatch != null) { foreach (var msg in match.Messages) existingMatch.Messages.Add(new ConversationMessageViewModel(msg)); } else { _matches.Insert(0, new MatchViewModel(match)); } } RaisePropertyChanged("Matches"); } }
public MatchViewModel(Match data) { _data = data; }