LogData() public method

public LogData ( string type, string direction, byte buffer, int index, int count ) : EventInfo
type string
direction string
buffer byte
index int
count int
return EventInfo
Esempio n. 1
0
        public void MainTest()
        {
            using (var writer = new StringWriter(CultureInfo.InvariantCulture))
            {
                AssertThrow <ArgumentNullException>(
                    () => new S101Logger(null, writer).Dispose(),
                    () => new S101Logger(GlowTypes.Instance, (TextWriter)null).Dispose(),
                    () => new S101Logger(GlowTypes.Instance, (XmlWriter)null).Dispose(),
                    () => new S101Logger((IEmberConverter)null, XmlWriter.Create(writer)).Dispose());

                using (var logger = new S101Logger(GlowTypes.Instance, writer))
                {
                    AssertThrow <ArgumentNullException>(
                        () => logger.LogData("Whatever", "Send", null, 0, 0),
                        () => logger.LogMessage(null, new S101Message(0x00, new KeepAliveRequest()), null),
                        () => logger.LogMessage("Send", null, null),
                        () => logger.LogException("Send", null));
                }
            }
        }
Esempio n. 2
0
        public void MainTest()
        {
            using (var writer = new StringWriter(CultureInfo.InvariantCulture))
            {
                AssertThrow<ArgumentNullException>(
                    () => new S101Logger(null, writer).Dispose(),
                    () => new S101Logger(GlowTypes.Instance, (TextWriter)null).Dispose(),
                    () => new S101Logger(GlowTypes.Instance, (XmlWriter)null).Dispose(),
                    () => new S101Logger((IEmberConverter)null, XmlWriter.Create(writer)).Dispose());

                using (var logger = new S101Logger(GlowTypes.Instance, writer))
                {
                    AssertThrow<ArgumentNullException>(
                        () => logger.LogData("Whatever", "Send", null, 0, 0),
                        () => logger.LogMessage(null, new S101Message(0x00, new KeepAliveRequest()), null),
                        () => logger.LogMessage("Send", null, null),
                        () => logger.LogException("Send", null));
                }
            }
        }