private void target_PropertyChanged(object sender, PropertyChangedEventArgs e) { if (!IsLastChild) { throw new InvalidOperationException("Target changes are only supported on " + "instances that do not have any children. If they have, their children " + "are supposed to track changes on these instances."); } //cyclicAccessRecord.RecordStepIn(AccessContext.TargetPropertyChanged, sender, e.PropertyName); cyclicAccessGuard.StepInOrThrow(AccessContext.TargetPropertyChanged, sender, e.PropertyName); RaiseSourceChanged(); cyclicAccessGuard.StepOutOrThrow(); //cyclicAccessRecord.StepOut(); }
public static void StepInOrThrow( this ICyclicAccessGuard <AccessTrace> guard, AccessContext context, object sender, string propertyName ) { var trace = new AccessTrace() { Context = context, Sender = sender, PropertyName = propertyName }; guard.StepInOrThrow(trace); }
public static void StepInOrThrow(this ICyclicAccessGuard <AccessTrace> guard) { guard.StepInOrThrow(null); }