本文整理汇总了C#中ProtoCore.RuntimeCore.SetProperties方法的典型用法代码示例。如果您正苦于以下问题:C# RuntimeCore.SetProperties方法的具体用法?C# RuntimeCore.SetProperties怎么用?C# RuntimeCore.SetProperties使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProtoCore.RuntimeCore
的用法示例。
在下文中一共展示了RuntimeCore.SetProperties方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestCompilerAndRuntimeComponent01
public void TestCompilerAndRuntimeComponent01()
{
String code =
@"
a = 10;
";
// Compile core
var opts = new Options();
opts.ExecutionMode = ExecutionMode.Serial;
ProtoCore.Core core = new Core(opts);
core.Compilers.Add(ProtoCore.Language.kAssociative, new ProtoAssociative.Compiler(core));
core.Compilers.Add(ProtoCore.Language.kImperative, new ProtoImperative.Compiler(core));
ProtoScriptRunner runner = new ProtoScriptRunner();
// Compiler instance
ProtoCore.DSASM.Executable dsExecutable;
bool compileSucceeded = runner.CompileMe(code, core, out dsExecutable);
Assert.IsTrue(compileSucceeded == true);
// Pass compile data to the runtime
RuntimeCore runtimeCore = new RuntimeCore(core.Heap);
runtimeCore.SetProperties(core.Options, dsExecutable);
// Runtime
ExecutionMirror mirror = runner.ExecuteMe(runtimeCore);
Obj o = mirror.GetValue("a");
示例2: SetUp
public void SetUp()
{
testCore = thisTest.SetupTestCore();
testRuntimeCore = new RuntimeCore(testCore.Heap);
testRuntimeCore.SetProperties(testCore.Options, null);
testExecutive = new TestExecutive(testRuntimeCore);
}