Example #1
0
        public async Task OpenFile(Stream stream)
        {
            var rope = new Rope <char>();

            using (var reader = new StreamReader(stream))
                using (var writer = new Editor.RopeWriter(rope))
                {
                    await reader.CopyToAsync(writer);
                }
            Document.Replace(0, Document.TextLength, new RopeTextSource(rope));
        }
Example #2
0
            public SoapResult(Stream data)
            {
                var rope = new Rope <char>();

                using (var reader = new StreamReader(data))
                    using (var writer = new Editor.RopeWriter(rope))
                    {
                        /*var buffer = new char[4096];
                         * var count = reader.Read(buffer, 0, buffer.Length);
                         * while (count > 0)
                         * {
                         * writer.Write(buffer, 0, count);
                         * count = reader.Read(buffer, 0, buffer.Length);
                         * }*/
                        IndentXml(reader, writer);
                    }
                _text = new RopeTextSource(rope);
            }
 public SoapResult(Stream data)
 {
   var rope = new Rope<char>();
   using (var reader = new StreamReader(data))
   using (var writer = new Editor.RopeWriter(rope))
   {
     /*var buffer = new char[4096];
     var count = reader.Read(buffer, 0, buffer.Length);
     while (count > 0)
     {
       writer.Write(buffer, 0, count);
       count = reader.Read(buffer, 0, buffer.Length);
     }*/
     IndentXml(reader, writer);
   }
   _text = new RopeTextSource(rope);
 }
Example #4
0
 public async Task OpenFile(Stream stream)
 {
   var rope = new Rope<char>();
   using (var reader = new StreamReader(stream))
   using (var writer = new Editor.RopeWriter(rope))
   {
     await reader.CopyToAsync(writer);
   }
   Document.Replace(0, Document.TextLength, new RopeTextSource(rope));
 }
 public ResultObject(Stream aml, IAsyncConnection conn)
 {
   System.Diagnostics.Debug.Print("{0:hh:MM:ss} Document loaded", DateTime.Now);
   var rope = new Rope<char>();
   using (var reader = new StreamReader(aml))
   using (var writer = new Editor.RopeWriter(rope))
   {
     IndentXml(reader, writer, out _count);
   }
   _amlLength = rope.Length;
   _conn = conn;
   _text = new RopeTextSource(rope);
   System.Diagnostics.Debug.Print("{0:hh:MM:ss} Document rendered", DateTime.Now);
 }
 public ResultObject(TestSuite suite, IAsyncConnection conn)
 {
   var rope = new Rope<char>();
   using (var writer = new Editor.RopeWriter(rope))
   {
     suite.Write(writer);
   }
   _amlLength = rope.Length;
   _count = suite.Tests.Count;
   _conn = conn;
   _text = new RopeTextSource(rope);
   _dataSet = new DataSet();
 }