Esempio n. 1
0
        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)));
        }
Esempio n. 2
0
        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)));
        }