Esempio n. 1
0
        public bool Equals(GitStatus other)
        {
            var equals =
                string.Equals(LocalBranch, other.LocalBranch) &&
                string.Equals(RemoteBranch, other.RemoteBranch) &&
                Ahead == other.Ahead &&
                Behind == other.Behind;

            if (!equals)
            {
                return(false);
            }
            if (Entries == null)
            {
                return(Entries == other.Entries);
            }

            // compare the entries in an unordered fashion
            var left  = Entries.Except(other.Entries);
            var right = other.Entries.Except(Entries);

            return(!left.Any() && !right.Any());

            ;
        }
Esempio n. 2
0
 private void RepositoryManagerOnGitStatusUpdated(GitStatus gitStatus)
 {
     taskManager.RunInUI(() =>
     {
         cacheContainer.GitStatusEntriesCache.Entries = gitStatus.Entries;
         cacheContainer.GitTrackingStatusCache.Ahead  = gitStatus.Ahead;
         cacheContainer.GitTrackingStatusCache.Behind = gitStatus.Behind;
     });
 }
Esempio n. 3
0
 public bool Equals(GitStatus other)
 {
     return
         (String.Equals(LocalBranch, other.LocalBranch) &&
          String.Equals(RemoteBranch, other.RemoteBranch) &&
          Ahead == other.Ahead &&
          Behind == other.Behind &&
          object.Equals(Entries, other.Entries)
         );
 }