本文整理汇总了C#中ScriptExecutionContext.PopStackFrame方法的典型用法代码示例。如果您正苦于以下问题:C# ScriptExecutionContext.PopStackFrame方法的具体用法?C# ScriptExecutionContext.PopStackFrame怎么用?C# ScriptExecutionContext.PopStackFrame使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ScriptExecutionContext
的用法示例。
在下文中一共展示了ScriptExecutionContext.PopStackFrame方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Function2
private static dynamic Function2(ScriptExecutionContext context, dynamic[] captures)
{
context.PushStackFrame("bar");
bool isError = false;
try {
context["Console"].WriteLine("bar");
return null;
} catch(Exception) {
isError = true;
throw;
} finally {
if (!isError) {
context.PopStackFrame();
}
}
}
示例2: Function1
private static dynamic Function1(ScriptExecutionContext context, dynamic[] captures)
{
context.PushStackFrame("foo");
bool isError = false;
try {
Invoke(context, context["bar"]);
return null;
} catch(Exception) {
isError = true;
throw;
} finally {
if (!isError) {
context.PopStackFrame();
}
}
}
示例3: Function4
private static dynamic Function4(ScriptExecutionContext context, dynamic[] captures, dynamic v21)
{
context.PushStackFrame("buildMultiplier");
context.DeclareVariable("x", v21);
bool isError = false;
try {
return new ScriptFunction(new Func<ScriptExecutionContext, dynamic[], dynamic, dynamic>(Function5), new dynamic[] { null }, new dynamic[] { context["x"] });
} catch(Exception) {
isError = true;
throw;
} finally {
if (!isError) {
context.PopStackFrame();
}
}
}
示例4: Function5
private static dynamic Function5(ScriptExecutionContext context, dynamic[] captures, dynamic v22)
{
context.PushStackFrame("<anonymous>");
context.DeclareVariable("y", v22);
context.DeclareVariable("x", captures[0]);
bool isError = false;
try {
return (context["x"] * context["y"]);
} catch(Exception) {
isError = true;
throw;
} finally {
if (!isError) {
context.PopStackFrame();
}
}
}
示例5: Function3
private static dynamic Function3(ScriptExecutionContext context, dynamic[] captures)
{
context.PushStackFrame("<anonymous>");
context.DeclareVariable("System", captures[0]);
context.DeclareVariable("string", captures[1]);
context.DeclareVariable("int", captures[2]);
bool isError = false;
try {
return ScriptType.FromValue(context["System"].Tuple, ScriptType.FromValue(context["string"]), ScriptType.FromValue(context["int"]));
} catch(Exception) {
isError = true;
throw;
} finally {
if (!isError) {
context.PopStackFrame();
}
}
}