예제 #1
0
 /// <summary>
 /// Акцессор до исходного мапинга
 /// </summary>
 public MappingInfo GetMappingInfo()
 {
     if (null == _info)
     {
         if (!File.Exists(_fileName))
         {
             _info = CreateNewInfo(_hash);
         }
         else
         {
             _info = LoadInfo(_fileName);
         }
         _info.Normalize();
     }
     return(_info);
 }
예제 #2
0
        private static void ReadCommits(XElement xml, MappingInfo result)
        {
            var commits = xml.Element(Const.COMMITSELEMENT);

            if (null != commits)
            {
                foreach (var e in commits.Elements())
                {
                    var commit = new Commit();
                    commit.Hash = e.Name.LocalName;
                    ReadCommitAuthorInfo(commit, e);
                    ReadCommitSourceInfo(commit, e);
                    result.Commits[commit.Hash] = commit;
                }
            }
        }
예제 #3
0
 /// <summary>
 /// Отменяет изменения и сбрасывает MappingInfo
 /// </summary>
 public void Cancel()
 {
     _info     = null;
     _commited = false;
 }