예제 #1
0
 public void SetDefaultValue(object value)
 {
     if (value != null)
     {
         if (IsBasicValue)
         {
             _basicDefaultValueObject.SetValue(value);
         }
         else
         {
             _complexDefaultValueObject = value;
         }
     }
     else
     { // 清除
         if (IsBasicValue)
         {
             _basicDefaultValueObject = null;
         }
         else
         {
             _complexDefaultValueObject = null;
         }
     }
 }
예제 #2
0
        public void SetValue(object value)
        {
            //sunjian 2019-01-02
            switch (value)
            {
            case List <BasicValue> parameterArray:
                _processParameterList = parameterArray;

                return;

            case Dictionary <string, BasicValue> dicKeyValue:
                _processParameterDictionary = dicKeyValue;
                break;
            }


            if (value != null)
            {
                _hasValue = true;
                if (IsBasicValue)
                {
                    _basicValueObject.SetValue(value);
                }
                else
                {
                    _complexValueObject = value;
                }
            }
            else
            { // 清除
                _hasValue = false;

                if (IsBasicValue)
                {
                    _basicValueObject = null;
                }
                else
                {
                    _complexValueObject = null;
                }
            }
        }