private void OpenXmppConnection(object sender, XmppConnectionOpenEventArgs e) { connectionListenerMap[e.XmppConnection.Id] = ((IXmppListener)sender).Name; e.XmppConnection.Closed += XmppConnectionClose; e.XmppConnection.XmppStreamEnd += XmppConnectionXmppStreamEnd; e.XmppConnection.XmppStreamElement += XmppConnectionXmppStreamElement; e.XmppConnection.XmppStreamStart += XmppConnectionXmppStreamStart; }