Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public static void StepInOrThrow(this ICyclicAccessGuard <AccessTrace> guard)
 {
     guard.StepInOrThrow(null);
 }