示例#1
0
        public void LightNodeEventSourceLogging()
        {
            var listener = new MockEventListener();
            listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways);

            var testServer = TestServer.Create(app =>
            {
                var option = new LightNodeOptions
                {
                    Logger = LightNode.Diagnostics.LightNodeEventSource.Log
                };

                app.UseLightNode(option, typeof(MockEnv).Assembly);
            });

            (listener.EventList.Count > 0).IsTrue();
        }
示例#2
0
        public void LightNodeEventSourceLogging()
        {
            var listener = new MockEventListener();

            listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways);

            var testServer = TestServer.Create((Action <Owin.IAppBuilder>)(app =>
            {
                var option = new LightNodeOptions
                {
                    Logger = LightNode.Diagnostics.LightNodeEventSource.Log
                };

                Owin.AppBuilderLightNodeMiddlewareExtensions.UseLightNode(app, option, typeof(MockEnv).Assembly);
            }));

            (listener.EventList.Count > 0).IsTrue();
        }
示例#3
0
        public void LightNodeEventSourceLogging()
        {
            var listener = new MockEventListener();

            listener.EnableEvents(LightNode.Diagnostics.LightNodeEventSource.Log, EventLevel.LogAlways);

            var testServer = TestServer.Create(app =>
            {
                var option = new LightNodeOptions
                {
                    Logger = LightNode.Diagnostics.LightNodeEventSource.Log
                };

                app.UseLightNode(option, typeof(MockEnv).Assembly);
            });

            (listener.EventList.Count > 0).IsTrue();
        }