private void RefreshList()
        {
            if (CommitsCollection != null && CommitsCollection.Any())
            {
                CommitsCollection.Clear();
            }

            using (var session = DbService.Instance.SessionFactory.OpenSession())
            {
                var commits = session.QueryOver <Commit>().List <Commit>();
                commits.ForEach(commit => CommitsCollection.Add(commit));
            }
        }
Esempio n. 2
0
        private void ClearViewModel()
        {
            if (CommitsCollection != null && CommitsCollection.Any())
            {
                CommitsCollection.Clear();
            }
            if (ChangesCollection != null && ChangesCollection.Any())
            {
                ChangesCollection.Clear();
            }
            if (ChangePatchCollection != null && ChangePatchCollection.Any())
            {
                ChangePatchCollection.Clear();
            }

            CommitSelectedItem = new KeyValuePair <int, string>();
            ChangeSelectedItem = new Changes();
        }
 private void HandleDataMessage(List <Commit> list)
 {
     CommitsCollection.Clear();
     list.ForEach(x => CommitsCollection.Add(x));
 }