/// <summary> /// We want to assure, that when a work status is passed, that it is not null by accident. /// </summary> public ContentUpdater(WorkStatus workStatus) { this.workStatus = workStatus ?? throw new ArgumentNullException(nameof(workStatus)); propertyChangedRelay = new PropertyChangedRelay() .AddAllowedProperty <IWorking>(prop => prop.IsWorking) .SubscribePropertyChangedNotifier(workStatus); propertyChangedRelay.NotifiersPropertyChanged += PropertyChangedRelay_NotifiersPropertyChanged; }
public CollectionSynchronisation(IList <ItemType> initialItemCollection, IList <ContentType> initialContentCollection, IEqualityComparer <ContentType>?equalityComparer) { workStatus = new WorkStatus(); propertyChangedRelay = new PropertyChangedRelay() .AddAllowedProperty <IWorking>(prop => prop.IsWorking) .SubscribePropertyChangedNotifier(workStatus); propertyChangedRelay.NotifiersPropertyChanged += PropertyChangedRelay_NotifiersPropertyChanged; EqualityComparer = equalityComparer ?? EqualityComparer <ContentType> .Default; // Set lists ItemList = initialItemCollection; ContentList = initialContentCollection; }
internal PropertyChangedRelaySubscription(PropertyChangedRelay relay, SingleTypePropertyCache <INotifyPropertyChanged> cache) { this.relay = relay; this.cache = cache; }