public XmppServer() { StorageManager = new StorageManager(); userManager = new UserManager(StorageManager); AuthManager = new AuthManager(); streamManager = new XmppStreamManager(); SessionManager = new XmppSessionManager(); gateway = new XmppGateway(); sender = new XmppSender(gateway); serviceManager = new XmppServiceManager(this); handlerManager = new XmppHandlerManager(streamManager, gateway, sender, this); }
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; }