Exemplo n.º 1
0
 public CQ_Content.Value GetValue(string name)
 {
     if (content == null)
     {
         content = env.CreateContent();
     }
     return(content.Get(name));
 }
Exemplo n.º 2
0
        public CQ_Content.Value ComputeValue(CQ_Content content)
        {
            content.InStack(this);
            var value = content.Get(value_name);

            content.OutStack(this);

            //从上下文取值

            return(value);
        }
Exemplo n.º 3
0
        public CQ_Content.Value ComputeValue(CQ_Content content)
        {
            content.InStack(this);

            var      v    = content.Get(value_name);
            ICQ_Type type = content.environment.GetType(v.type);
            CQType   returntype;
            object   value = type.Math2Value(content, mathop, v.value, CQ_Content.Value.One, out returntype);

            value = type.ConvertTo(content, value, v.type);
            content.Set(value_name, value);

            //操作变量之
            //做数学计算
            //从上下文取值
            //_value = null;
            content.OutStack(this);

            return(content.Get(value_name));
        }
Exemplo n.º 4
0
        public CQ_Value ComputeValue(CQ_Content content)
        {
#if CQUARK_DEBUG
            content.InStack(this);
#endif
            var     v    = content.Get(value_name);
            IType   type = CQuark.AppDomain.GetType(v.type);
            CQ_Type returntype;
            object  value = type.Math2Value(mathop, v.value, CQ_Value.One, out returntype);
            value = type.ConvertTo(value, v.type);
            content.Set(value_name, value);

            //操作变量之
            //做数学计算
            //从上下文取值
            //_value = null;
#if CQUARK_DEBUG
            content.OutStack(this);
#endif
            return(content.Get(value_name));
        }
Exemplo n.º 5
0
        public CQ_Value ComputeValue(CQ_Content content)
        {
#if CQUARK_DEBUG
            content.InStack(this);
#endif
            var value = content.Get(value_name);
#if CQUARK_DEBUG
            content.OutStack(this);
#endif

            //从上下文取值

            return(value);
        }
Exemplo n.º 6
0
        public CQ_Value ComputeValue(CQ_Content content)
        {
#if CQUARK_DEBUG
            content.InStack(this);
#endif
            CQ_Value v      = content.Get(value_name);
            IType    type   = CQuark.AppDomain.GetITypeByCQValue(v);
            CQ_Value retVal = type.Math2Value(mathop, v, CQ_Value.One);
            v.UsingValue(retVal);
            content.Set(value_name, v);

#if CQUARK_DEBUG
            content.OutStack(this);
#endif
            return(v);
        }