Esempio n. 1
0
        /// <summary>Converts the XML read with <paramref name="logReader"/> and writes it into
        /// <paramref name="logWriter"/>.</summary>
        public static void Convert(XmlReader logReader, XmlWriter logWriter)
        {
            if (logWriter == null)
            {
                throw new ArgumentNullException(nameof(logWriter));
            }

            var interpreter = new GlowLogInterpreter(GlowTypes.Instance, logReader);
            var converter   = new Converter(interpreter, logWriter);

            using (var logger = new S101Logger(converter, logWriter))
            {
                var dummy = new byte[0];

                while (interpreter.Read())
                {
                    logger.LogMessage(interpreter.TimeUtc, interpreter.Direction, interpreter.Message, dummy);
                }
            }
        }
Esempio n. 2
0
            ////////////////////////////////////////////////////////////////////////////////////////////////////////////

            internal Converter(GlowLogInterpreter interpreter, XmlWriter writer)
            {
                this.interpreter = interpreter;
                this.writer      = writer;
                this.Add(this.interpreter.Root);
            }