当前位置: 首页>>代码示例>>C#>>正文


C# CLS_Content.OutStack方法代码示例

本文整理汇总了C#中CSLE.CLS_Content.OutStack方法的典型用法代码示例。如果您正苦于以下问题:C# CLS_Content.OutStack方法的具体用法?C# CLS_Content.OutStack怎么用?C# CLS_Content.OutStack使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSLE.CLS_Content的用法示例。


在下文中一共展示了CLS_Content.OutStack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     content.InStack(this);
     var parent = listParam[0].ComputeValue(content);
     var typefunction = content.environment.GetType(parent.type).function;
     if(parent.type is object)
     {
         SInstance s = parent.value as SInstance;
         if(s!=null)
         {
             typefunction = s.type;
         }
     }
     List<CLS_Content.Value> _params = new List<CLS_Content.Value>();
     for (int i = 1; i < listParam.Count; i++)
     {
         _params.Add(listParam[i].ComputeValue(content));
     }
     CLS_Content.Value value = null;
     if (cache == null||cache.cachefail)
     {
         cache = new MethodCache();
         value = typefunction.MemberCall(content, parent.value, functionName, _params,cache);
     }
     else
     {
         value = typefunction.MemberCallCache(content, parent.value, _params, cache);
     }
     content.OutStack(this);
     return value;
     //做数学计算
     //从上下文取值
     //_value = null;
     //return null;
 }
开发者ID:qq1792,项目名称:CSLightStudio,代码行数:35,代码来源:CLS_Expression_MemberFunction.cs

示例2: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            CLS_Content.Value rv = new CLS_Content.Value();


            {
                var v = listParam[0].ComputeValue(content);
                {
                    rv.type = v.type;
                    rv.value = v.value;
                }
                Exception err = v.value as Exception;
                if (err != null)
                {
                    throw err;
                }
                else
                {
                    throw new Exception(v.ToString());
                }
            }

            content.OutStack(this);
            return rv;

            //for 逻辑
            //做数学计算
            //从上下文取值
            //_value = null;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:31,代码来源:CLS_Expression_Throw.cs

示例3: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            var parent = listParam[0].ComputeValue(content);
            if (parent == null)
            {
                throw new Exception("调用空对象的方法:" + listParam[0].ToString() + ":" + ToString());
            }
            var type = content.environment.GetType(parent.type);
            //string membername=null;


            var getvalue = type.function.MemberValueGet(content, parent.value, membername);

            CLS_Content.Value vright = CLS_Content.Value.One;
            if (listParam.Count > 1)
            {
                vright = listParam[1].ComputeValue(content);
            }
            CLS_Content.Value vout =new CLS_Content.Value();
            var mtype = content.environment.GetType(getvalue.type);
            vout.value = mtype.Math2Value(content, mathop, getvalue.value, vright, out vout.type);

            type.function.MemberValueSet(content, parent.value, membername, vout.value);
            //CLS_Content.Value v = new CLS_Content.Value();

            content.OutStack(this);
            return vout;
            //做数学计算
            //从上下文取值
            //_value = null;
            //return null;

        }
开发者ID:lightszero,项目名称:cslightcore,代码行数:34,代码来源:CLS_Expression_MemberMath.cs

示例4: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            var parent = listParam[0].ComputeValue(content);
            if (parent == null)
            {
                throw new Exception("调用空对象的方法:" + listParam[0].ToString() + ":" + ToString());
            }
            var key = listParam[1].ComputeValue(content);
            var type = content.environment.GetType(parent.type);

            var value = type.function.IndexGet(content, parent.value, key.value);
            content.OutStack(this);

            //IndexGet返回的值类型是 System.Object.
            //在这里需要将类型明确化.
            //value.type = value.value.GetType();

            return value;
            //return type.function.MemberValueGet(content.environment, parent.value, membername);
            //做数学计算
            //从上下文取值
            //_value = null;
            //return null;
        }
开发者ID:lightszero,项目名称:cslightcore,代码行数:25,代码来源:CLS_Expression_IndexFind.cs

示例5: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     content.InStack(this);
     //var parent = listParam[0].ComputeValue(content);
     //var type = content.environment.GetType(parent.type);
     List<CLS_Content.Value> _params = new List<CLS_Content.Value>();
     for (int i = 0; i < listParam.Count; i++)
     {
         _params.Add(listParam[i].ComputeValue(content));
     }
     CLS_Content.Value value = null;
     if (cache == null || cache.cachefail)
     {
         cache = new MethodCache();
         value = type.function.StaticCall(content, functionName, _params, cache);
     }
     else
     {
         value = type.function.StaticCallCache(content, _params, cache);
     }
     
     content.OutStack(this);
     return value;
     //做数学计算
     //从上下文取值
     //_value = null;
     //return null;
 }
开发者ID:qq1792,项目名称:CSLightStudio,代码行数:28,代码来源:CLS_Expression_StaticFunction.cs

示例6: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);

            if (_listParam != null && _listParam.Count > 0)
            {

                CLS_Content.Value v = _listParam[0].ComputeValue(content);
                object val = v.value;
                if ((Type)value_type == typeof(CLS_Type_Var.var))
                {
                    if(v.type!=null)
                        value_type = v.type;
                    
                }
                else if (v.type != value_type)
                {
                    val = content.environment.GetType(v.type).ConvertTo(content, v.value, value_type);
                   
                }

                content.DefineAndSet(value_name, value_type, val);
            }
            else
            {
                content.Define(value_name, value_type);
            }
            //设置环境变量为
            content.OutStack(this);

            return null;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:32,代码来源:CLS_Expression_Define.cs

示例7: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            var parent = listParam[0].ComputeValue(content);
            if (parent == null)
            {
                throw new Exception("调用空对象的方法:" + listParam[0].ToString() + ":" + ToString());
            }
            ICLS_TypeFunction typefunction = content.environment.GetType(parent.type).function;
            if(parent.type is object)
            {
                SInstance s =parent.value as SInstance;
                if(s!=null)
                {
                    typefunction = s.type;
                }
            }
            //var type = content.environment.GetType(parent.type);
            var value=typefunction.MemberValueGet(content, parent.value, membername);
            content.OutStack(this);
            return value;
            //做数学计算
            //从上下文取值
            //_value = null;
            //return null;

        }
开发者ID:lightszero,项目名称:cslightcore,代码行数:27,代码来源:CLS_Expression_MemberFind.cs

示例8: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            CLS_Content.Value rv = new CLS_Content.Value();
            rv.breakBlock = 10;
            if (listParam.Count > 0&&listParam[0]!=null)
            {
                var v = listParam[0].ComputeValue(content);
                {
                    rv.type = v.type;
                    rv.value = v.value;
                }
            }
            else
            {
                rv.type = typeof(void);
            }
            content.OutStack(this);
            return rv;

            //for 逻辑
            //做数学计算
            //从上下文取值
            //_value = null;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:25,代码来源:CLS_Expression_LoopReturn.cs

示例9: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     content.InStack(this);
     var parent = listParam[0].ComputeValue(content);
     var value = listParam[1].ComputeValue(content);
     object setv=value.value;
     //if(value.type!=parent.type)
     //{
     //    var vtype = content.environment.GetType(value.type);
     //    setv = vtype.ConvertTo(content.environment, setv, parent.type);
     //}
     var typefunction = content.environment.GetType(parent.type).function;
     if(parent.type is object)
     {
         SInstance s = parent.value as SInstance;
         if(s!=null)
         {
             typefunction = s.type;
         }
     }
     typefunction.MemberValueSet(content, parent.value, membername, setv);
     //做数学计算
     //从上下文取值
     //_value = null;
     content.OutStack(this);
     return null;
 }
开发者ID:qq1792,项目名称:CSLightStudio,代码行数:27,代码来源:CLS_Expression_MemberSetValue.cs

示例10: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     content.InStack(this);
     CLS_Content.Value value = type.function.StaticValueGet(content, staticmembername);
     content.OutStack(this);
     return value;
 }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:7,代码来源:CLS_Expression_StaticFind.cs

示例11: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);

            {
                
                CLS_Content.Value v = listParam[0].ComputeValue(content);

                        {
                            object val = v.value;
                            if (content.values.ContainsKey(value_name))
                            {
                                CLType value_type = content.values[value_name].type;

                                val = v.value;
                                if ((Type)value_type != typeof(CLS_Type_Var.var) && value_type != v.type)
                                {
                                    val = content.environment.GetType(v.type).ConvertTo(content, v.value, value_type);
                                }
                            }
                    content.Set(value_name, val);
                    }
            }
            content.OutStack(this);
            return null;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:26,代码来源:CLS_Expression_SetValue.cs

示例12: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            content.DepthAdd();

            CLS_Content.Value vrt = null;

            ICLS_Expression expr_while = listParam[1];
            ICLS_Expression expr_block = listParam[0];

            do
            {
                if (expr_block != null)
                {
                    CLS_Content.Value v = expr_block.ComputeValue(content);
                    if (v != null)
                    {
                        if (v.breakBlock > 2)
                            vrt = v;
                        if (v.breakBlock > 1)
                            break;
                    }
                }
            } while ((bool)expr_while.ComputeValue(content).value);

            content.DepthRemove();
            content.OutStack(this);
            return vrt;
        }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:29,代码来源:CLS_Expression_LoopDowhile.cs

示例13: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);
            List<object> list = new List<object>();
            int count = listParam[0] == null ? (listParam.Count - 1) : (int)listParam[0].ComputeValue(content).value;
            if (count == 0)
                throw new Exception("不能创建0长度数组");
            CLS_Content.Value vcount = new CLS_Content.Value();
            vcount.type = typeof(int);
            vcount.value = count;
            for (int i = 1; i < listParam.Count; i++)
            {
                //if (listParam[i] != null)
                {
                    list.Add(listParam[i].ComputeValue(content).value);
                }
            }
            List<CLS_Content.Value> p = new List<CLS_Content.Value>();
            p.Add(vcount);
            var outvalue = type.function.New(content, p);
            for (int i = 0; i < list.Count; i++)
            {
                type.function.IndexSet(content, outvalue.value, i, list[i]);
            }
            content.OutStack(this);
            return outvalue;

        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:28,代码来源:CLS_Expression_FunctionNewArray.cs

示例14: ComputeValue

        public CLS_Content.Value ComputeValue(CLS_Content content)
        {
            content.InStack(this);


            var left = listParam[0].ComputeValue(content);
            var right = listParam[1].ComputeValue(content);
            ICLS_Type type = content.environment.GetType(left.type);
            //if (mathop == "+=")

            {
                CLType returntype;
                object value = type.Math2Value(content, mathop, left.value, right, out returntype);
                value = type.ConvertTo(content, value, left.type);
                left.value = value;

                //content.Set(value_name, value);
            }

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

            return null;
        }
开发者ID:GraphicGame,项目名称:CSLightStudio,代码行数:27,代码来源:CLS_Expression_SelfOpWithValue.cs

示例15: ComputeValue

 public CLS_Content.Value ComputeValue(CLS_Content content)
 {
     content.InStack(this);
     CLS_Content.Value value = listParam[0].ComputeValue(content);
     type.function.StaticValueSet(content, staticmembername, value.value);
     content.OutStack(this);
     return null;
 }
开发者ID:wpszz,项目名称:CSLightForUnity,代码行数:8,代码来源:CLS_Expression_StaticSetValue.cs


注:本文中的CSLE.CLS_Content.OutStack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。