public void Unsubscribe(ClientObserver observer) { lock (_MyLock) { if (Subscribers.Contains(observer)) { Subscribers.Remove(observer); } } }
public void Subscribe(ClientObserver observer) { lock (_MyLock) { if (observer != null && !Subscribers.Contains(observer)) { Subscribers.Add(observer); } } }