コード例 #1
0
        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;
        }
コード例 #2
0
        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;
        }