private TempFile updateContent(ref string content, RealtimeChangeMessage x)
 {
     var file = Path.Combine(Path.GetTempPath(), getFileName(x.File));
     var relativePath = getRelativePath(x.Project, x.File);
     content = content.Replace("\"" + relativePath + "\"", "\"" + file + "\"");
     content = content.Replace("\"" + x.File + "\"", "\"" + file + "\"");
     Logger.WriteDebug(string.Format("Replacing {0} or {1} with {2}", relativePath, x.File, file));
     File.WriteAllText(file, x.Content);
     Logger.WriteDebug("File written " + file);
     return new TempFile(x.Project, file, x.File);
 }
 public void SetDataFrom(BinaryReader reader)
 {
     Messages = new List<RealtimeChangeMessage>();
     var count = reader.ReadInt32();
     for (int i = 0; count > i; i++)
     {
         var message = new RealtimeChangeMessage("", "", "");
         message.SetDataFrom(reader);
         Messages.Add(message);
     }
 }
Ejemplo n.º 3
0
        public void SetDataFrom(BinaryReader reader)
        {
            Messages = new List <RealtimeChangeMessage>();
            var count = reader.ReadInt32();

            for (int i = 0; count > i; i++)
            {
                var message = new RealtimeChangeMessage("", "", "");
                message.SetDataFrom(reader);
                Messages.Add(message);
            }
        }