Ejemplo n.º 1
0
        public XmppHandlerManager(XmppStreamManager streamManager, IXmppReceiver receiver, IXmppSender sender, IServiceProvider serviceProvider)
        {
            if (streamManager == null)
            {
                throw new ArgumentNullException("streamManager");
            }
            if (receiver == null)
            {
                throw new ArgumentNullException("receiver");
            }
            if (sender == null)
            {
                throw new ArgumentNullException("sender");
            }
            if (serviceProvider == null)
            {
                throw new ArgumentNullException("serviceProvider");
            }

            this.streamManager  = streamManager;
            this.sender         = sender;
            this.HandlerStorage = new XmppHandlerStorage(serviceProvider);
            this.context        = new XmppHandlerContext(serviceProvider);

            this.validator = new XmppStreamValidator();

            receiver.XmppStreamStart   += XmppStreamStart;
            receiver.XmppStreamElement += XmppStreamElement;
            receiver.XmppStreamEnd     += XmppStreamEnd;
        }
Ejemplo n.º 2
0
        public XmppHandlerManager(XmppStreamManager streamManager, IXmppReceiver receiver, IXmppSender sender, IServiceProvider serviceProvider)
        {
            if (streamManager == null) throw new ArgumentNullException("streamManager");
            if (receiver == null) throw new ArgumentNullException("receiver");
            if (sender == null) throw new ArgumentNullException("sender");
            if (serviceProvider == null) throw new ArgumentNullException("serviceProvider");

            this.streamManager = streamManager;
            this.sender = sender;
            this.HandlerStorage = new XmppHandlerStorage(serviceProvider);
            this.context = new XmppHandlerContext(serviceProvider);

            this.validator = new XmppStreamValidator();

            receiver.XmppStreamStart += XmppStreamStart;
            receiver.XmppStreamElement += XmppStreamElement;
            receiver.XmppStreamEnd += XmppStreamEnd;
        }