public void OnRegister(IServiceProvider serviceProvider) { offlineStore = ((StorageManager)serviceProvider.GetService(typeof(StorageManager))).OfflineStorage; rosterStore = ((StorageManager)serviceProvider.GetService(typeof(StorageManager))).RosterStorage; sender = (IXmppSender)serviceProvider.GetService(typeof(IXmppSender)); sessionManager = (XmppSessionManager)serviceProvider.GetService(typeof(XmppSessionManager)); handlerManager = (XmppHandlerManager)serviceProvider.GetService(typeof(XmppHandlerManager)); sessionManager.SessionAvailable += SessionAvailable; sessionManager.SessionUnavailable += SessionUnavailable; }
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 void OnRegister(IServiceProvider serviceProvider) { serviceManager = (XmppServiceManager)serviceProvider.GetService(typeof(XmppServiceManager)); handlerManager = (XmppHandlerManager)serviceProvider.GetService(typeof(XmppHandlerManager)); }
protected override void OnRegisterCore(XmppHandlerManager handlerManager, XmppServiceManager serviceManager, IServiceProvider provider) { context = provider; this.handlerManager = handlerManager; LoadRooms(); }
protected override void OnUnregisterCore(XmppHandlerManager handlerManager, XmppServiceManager serviceManager, IServiceProvider serviceProvider) { handlerManager.RemoveXmppHandler(messageAnnounceHandler); }
protected override void OnRegisterCore(XmppHandlerManager handlerManager, XmppServiceManager serviceManager, IServiceProvider serviceProvider) { var jid = new Jid(Jid.ToString()); jid.Resource = MessageAnnounceHandler.ANNOUNCE; handlerManager.AddXmppHandler(jid, messageAnnounceHandler); }
protected virtual void OnUnregisterCore(XmppHandlerManager handlerManager, XmppServiceManager serviceManager, IServiceProvider serviceProvider) { }
protected override void OnRegisterCore(XmppHandlerManager handlerManager, XmppServiceManager serviceManager, IServiceProvider serviceProvider) { base.OnRegisterCore(handlerManager, serviceManager, serviceProvider); LoadRoomSettings(); }