コード例 #1
0
ファイル: UsedProperty.cs プロジェクト: pbalaga/xreactor
        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();
        }
コード例 #2
0
ファイル: CyclicAccessGuard.cs プロジェクト: pbalaga/xreactor
        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);
        }
コード例 #3
0
ファイル: CyclicAccessGuard.cs プロジェクト: pbalaga/xreactor
 public static void StepInOrThrow(this ICyclicAccessGuard <AccessTrace> guard)
 {
     guard.StepInOrThrow(null);
 }