示例#1
0
        private void ListenerMessageReceived(object sender, MessageReceivedEventArgs e)
        {
            var request     = e.Message;
            var context     = SnmpContextFactory.Create(request, e.Sender, Listener.Users, _group, e.Binding);
            var application = _factory.Create(context);

            application.Process();
        }
示例#2
0
        private void ListenerMessageReceived(object sender, MessageReceivedEventArgs e)
        {
#if DEBUG
            var watch = new Stopwatch();
            watch.Start();
#endif
            var request     = e.Message;
            var context     = SnmpContextFactory.Create(request, e.Sender, Listener.Users, _group, e.Binding);
            var application = _factory.Create(context);
            application.Process();
#if DEBUG
            watch.Stop();
            Console.WriteLine("agent {0}: {1}", request.RequestId(), watch.Elapsed);
#endif
        }