本文整理汇总了C#中Rhino.Context.SetLanguageVersion方法的典型用法代码示例。如果您正苦于以下问题:C# Context.SetLanguageVersion方法的具体用法?C# Context.SetLanguageVersion怎么用?C# Context.SetLanguageVersion使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rhino.Context
的用法示例。
在下文中一共展示了Context.SetLanguageVersion方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnContextCreated
protected internal override void OnContextCreated(Context cx)
{
cx.SetLanguageVersion(languageVersion);
cx.SetOptimizationLevel(optimizationLevel);
if (errorReporter != null)
{
cx.SetErrorReporter(errorReporter);
}
cx.SetGeneratingDebug(generatingDebug);
base.OnContextCreated(cx);
}
示例2: SetUp
public virtual void SetUp()
{
cx = Context.Enter();
cx.SetLanguageVersion(Context.VERSION_1_8);
}
示例3: SetUp
public virtual void SetUp()
{
cx = Context.Enter();
scope = cx.InitStandardObjects();
cx.SetLanguageVersion(170);
}
示例4: Version
/// <summary>Get and set the language version.</summary>
/// <remarks>
/// Get and set the language version.
/// This method is defined as a JavaScript function.
/// </remarks>
public static double Version(Context cx, Scriptable thisObj, object[] args, Function funObj)
{
double result = cx.GetLanguageVersion();
if (args.Length > 0)
{
double d = Context.ToNumber(args[0]);
cx.SetLanguageVersion((int)d);
}
return result;
}