public void RegisterReceiver(ISignalReceiver receiver) { if (receiver == null) { Log.Error("Tried to register a null reciever.", false); return; } if (this.receivers.Contains(receiver)) { Log.Error("Tried to register the same receiver twice: " + receiver.ToStringSafe <ISignalReceiver>(), false); return; } this.receivers.Add(receiver); }
public void RegisterReceiver(ISignalReceiver receiver) { if (receiver == null) { Log.Error("Tried to register a null reciever."); } else if (this.receivers.Contains(receiver)) { Log.Error("Tried to register the same receiver twice: " + receiver.ToStringSafe()); } else { this.receivers.Add(receiver); } }