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