예제 #1
0
 private void DoRebuild()
 {
     lock (this)
     {
         if (!_needsRebuild || ParentContainer == null)
         {
             return;
         }
         bool hasCallback = false;
         HasDecision = !string.IsNullOrEmpty(ConditionID);
         DoDestroy();
         _propWrapper = PropertyWrapper.Create(GetFullID(), typeof(bool), OnPropertyChanged);
         if (_propWrapper != null && _propWrapper.Target is CompBase)
         {
             _propertyExpression = _propWrapper.GetGetPropExpression <bool>() as Expression <Func <bool> >;
             if (_propertyExpression != null)
             {
                 U.RegisterOnChanged(_propertyExpression, OnBoolPropertyChanged);
                 //(_propWrapper.Target as CompBase).RegisterOnChanged(_propertyExpression, OnBoolPropertyChanged);
                 hasCallback = true;
             }
             else
             {
                 _propWrapper = null;
             }
         }
         HasCallback   = hasCallback;
         _needsRebuild = false;
     }
 }