コード例 #1
0
 public bool Equals(ConfigRemote other)
 {
     return
         (String.Equals(name, other.name) &&
          String.Equals(url, other.url)
         );
 }
コード例 #2
0
        public void UpdateData(IRepositoryInfoCacheData data)
        {
            var now       = DateTimeOffset.Now;
            var isUpdated = false;

            if (!Nullable.Equals(currentGitRemote, data.CurrentGitRemote))
            {
                currentGitRemote = data.CurrentGitRemote ?? GitRemote.Default;
                isUpdated        = true;
            }

            if (!Nullable.Equals(currentGitBranch, data.CurrentGitBranch))
            {
                currentGitBranch = data.CurrentGitBranch ?? GitBranch.Default;
                isUpdated        = true;
            }

            if (!Nullable.Equals(currentConfigRemote, data.CurrentConfigRemote))
            {
                currentConfigRemote = data.CurrentConfigRemote ?? ConfigRemote.Default;
                isUpdated           = true;
            }

            if (!Nullable.Equals(currentConfigBranch, data.CurrentConfigBranch))
            {
                currentConfigBranch = data.CurrentConfigBranch ?? ConfigBranch.Default;
                isUpdated           = true;
            }

            SaveData(now, isUpdated);
        }
コード例 #3
0
ファイル: Repository.cs プロジェクト: Bruno-Zamp/Unity-1
 private static GitRemote GetGitRemote(ConfigRemote configRemote) => new GitRemote(configRemote.Name, configRemote.Url);
コード例 #4
0
 private static GitRemote GetGitRemote(ConfigRemote configRemote)
 {
     return(new GitRemote(configRemote.Name, configRemote.Url));
 }
コード例 #5
0
 private GitRemote GetGitRemote(ConfigRemote configRemote)
 {
     return(new GitRemote {
         Name = configRemote.Name, Url = configRemote.Url
     });
 }
コード例 #6
0
 public ConfigBranch(string name, ConfigRemote?remote, string trackingBranch)
 {
     this.name           = name;
     this.remote         = remote ?? ConfigRemote.Default;
     this.trackingBranch = trackingBranch != null && trackingBranch.StartsWith("refs/heads") ? trackingBranch.Substring("refs/heads".Length + 1) : null;
 }
コード例 #7
0
 public ConfigBranch(string name)
 {
     this.name           = name;
     this.trackingBranch = null;
     remote = ConfigRemote.Default;
 }
コード例 #8
0
 public ConfigBranch(string name, ConfigRemote?remote)
 {
     this.name   = name;
     this.remote = remote ?? ConfigRemote.Default;
 }
コード例 #9
0
 public ConfigBranch(string name)
 {
     this.name = name;
     remote    = ConfigRemote.Default;
 }