Example #1
0
        static string[] GetFileLines(byte[] data)
        {
            Encoding encoding = null;
            string   text     = DXVCSHelpers.ReadTextFromByte(data, out encoding);

            return(StringsDiff.GetTextLines(text));
        }
Example #2
0
 public void AddItem(int index, FileVersionInfo info)
 {
     if (index == 0)
     {
         baseData       = GetFileLines(info.Data);
         historyInfo[0] = new FileVersionInfoBase(info);
     }
     else
     {
         string[] revisionData = GetFileLines(info.Data);
         deltas[index - 1]  = StringsDiff.DiffStringLines(revisionData, baseData, SpacesAction);
         historyInfo[index] = new FileVersionInfoBase(info);
         baseData           = revisionData;
     }
 }