public static void UnRegisterReceiver(NewInformationDelegate p_rReceiver, eInformationType p_eInformationType) { NewInformationDelegate Delegate; if (!m_lReceivers.TryGetValue(p_eInformationType, out Delegate)) { Delegate -= p_rReceiver; m_lReceivers.Remove(p_eInformationType); m_lReceivers.Add(p_eInformationType, Delegate); } }
public static void RegisterReceiver(NewInformationDelegate p_rReceiver, eInformationType p_eInformationType) { NewInformationDelegate Delegate; if (!m_lReceivers.TryGetValue(p_eInformationType, out Delegate)) { Delegate += new NewInformationDelegate(p_rReceiver); m_lReceivers.Add(p_eInformationType, Delegate); } else { Delegate += new NewInformationDelegate(p_rReceiver); m_lReceivers.Remove(p_eInformationType); m_lReceivers.Add(p_eInformationType, Delegate); } }