本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}