public ChatViewModel([NotNull] GablarskiSocialClient client, ChatHistory history) { if (client == null) throw new ArgumentNullException ("client"); this.client = client; this.closeGroupCommand = new RelayCommand<Group> (CloseGroupCore); this.groups = new SelectedObservableCollection<Group, GroupViewModel> (client.Groups, g => new GroupViewModel (client, g, history.GetMessages (g))); }
public ChatViewModel([NotNull] GablarskiSocialClient client, ChatHistory history) { if (client == null) { throw new ArgumentNullException("client"); } this.client = client; this.closeGroupCommand = new RelayCommand <Group> (CloseGroupCore); this.groups = new SelectedObservableCollection <Group, GroupViewModel> (client.Groups, g => new GroupViewModel(client, g, history.GetMessages(g))); }