public void OnPropertyChanged(string property) { foreach (WeakReference entry in this.registrar) { if (!entry.IsAlive) { continue; } userId dataStore = (userId)entry.Target; dataStore.FirePropertyChanged(property); } }
public void Register(userId dataStore) { this.registrar.Add(new WeakReference(dataStore)); }