Ejemplo n.º 1
0
 public ViewModelBase()
 {
     DynamicParentResolver             = new DynamicParentResolver(this);
     knownParentsContainer             = new KnownParentsContainer(this);
     havingParentsPropertyChangedCache = new SingleTypePropertyCache <IHaveParents>(this);
     havingParentsPropertyChangedCache.PropertyAdded   += HavingParentsPropertyChangedCache_PropertyCacheAdded;
     havingParentsPropertyChangedCache.PropertyRemoved -= HavingParentsPropertyChangedCache_PropertyCacheRemoved;
     /// We only subscribe to <see cref="IWorking"/>-container, so that we can on calculate
     /// <see cref="IsWorking"/> properly.
     workStatusPropertyChangedCache = new SingleTypePropertyCache <IWorking>(this);
     WorkStatus              = new WorkStatus();
     validationErrors        = new Dictionary <string, ICollection <string> >();
     validationErrorPreviews = new Dictionary <string, ICollection <string> >();
 }
Ejemplo n.º 2
0
 internal PropertyChangedRelaySubscription(PropertyChangedRelay relay, SingleTypePropertyCache <INotifyPropertyChanged> cache)
 {
     this.relay = relay;
     this.cache = cache;
 }