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));
            }
        }
Ejemplo 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();
        }