Esempio n. 1
0
        public void Save(Stream stream, RipDocument document)
        {
            var writer = new RipWriter(stream);

            foreach (var command in document.Commands)
            {
                command.Write(writer);
            }
            writer.WriteNewCommand("#|#|#");
            writer.WriteNewLine();
        }
Esempio n. 2
0
        public static void Write(this NetOutgoingMessage message, IEnumerable <RipCommand> commands)
        {
            var stream = new MemoryStream();
            var writer = new RipWriter(stream);

            foreach (var command in commands)
            {
                command.Write(writer);
            }
            stream.Flush();
            stream.Position = 0;
            message.WriteStream((Stream)stream);
        }
Esempio n. 3
0
 public virtual void Write(RipWriter writer)
 {
     writer.WriteNewCommand(OpCode);
 }