/// ////////////////////////////////////////////////////////////////////////// protected void EnvoieNotificationsThread(IDonneeNotification[] donnees, TypeGestionSessionEnvoyeur typeGestion) { foreach (CSessionClientSurServeur session in CGestionnaireSessions.ListeSessionsServeur) { try { EnvoieNotificationsToSessionCallBack sender = new EnvoieNotificationsToSessionCallBack(EnvoieNotificationToSessionThread); sender.BeginInvoke(session.SessionClient, donnees, null, null); } catch { C2iEventLog.WriteErreur(I.T("Sending notifiations to session @1 error|104", session.IdSession.ToString())); } } //Transfert de la notification aux serveurs annexes foreach (string strURI in m_tableServeursAnnexes.Keys) { if (strURI != "") { try { IGestionnaireNotification gestionnaireAnnexe = (IGestionnaireNotification)Activator.GetObject(typeof(IGestionnaireNotification), strURI + "/IGestionnaireNotification"); gestionnaireAnnexe.RelaieNotifications(donnees); } catch (Exception e) { C2iEventLog.WriteErreur(I.T("Secondary server error @1\r\n@2|103", strURI, e.ToString())); } } } }
/// /////////////////////////////////////////////////////////////////// public static void EnvoieNotifications(IDonneeNotification[] donnees) { if (donnees.Length == 0) { return; } IGestionnaireNotification gestionnaire = (IGestionnaireNotification)C2iFactory.GetNewObjetForSession("CGestionnaireNotification", typeof(IGestionnaireNotification), donnees[0].IdSessionEnvoyeur); if (gestionnaire != null) { gestionnaire.EnvoieNotifications(donnees); } }
private void FillPageNotifications() { IGestionnaireNotification gestionnaire = (IGestionnaireNotification)C2iFactory.GetNewObjetForSession("CGestionnaireNotification", typeof(IGestionnaireNotification), CSessionClient.GetSessionUnique().IdSession); //m_labelNbRecepteursNotification.Text = gestionnaire.GetNbRecepteurs().ToString(); }