Ejemplo n.º 1
0
 public SyncHistoryWrapper(SyncHistory history, DXVcsWrapper vcsWrapper, string vcsHistoryPath, string localHistoryPath)
 {
     this.history = history;
     this.vcsHistoryPath = vcsHistoryPath;
     this.localHistoryPath = localHistoryPath;
     this.vcsWrapper = vcsWrapper;
 }
Ejemplo n.º 2
0
 public static void Serialize(SyncHistory history, string path)
 {
     SharpSerializerXmlSettings settings = new SharpSerializerXmlSettings();
     settings.IncludeAssemblyVersionInTypeName = false;
     settings.IncludePublicKeyTokenInTypeName = false;
     SharpSerializer serializer = new SharpSerializer(settings);
     serializer.Serialize(history, path);
 }
Ejemplo n.º 3
0
 public void Save()
 {
     try {
         this.vcsWrapper.CheckOutFile(this.vcsHistoryPath, this.localHistoryPath, true, string.Empty);
         SyncHistory.Serialize(this.history.Clone(this.historyLimit), localHistoryPath);
         this.vcsWrapper.CheckInFile(vcsHistoryPath, localHistoryPath, string.Empty);
     }
     catch (Exception ex) {
         Log.Error($"Save history to {vcsHistoryPath} failed.", ex);
         throw;
     }
 }