次のコードを想定します。
public class Foo
{
public string Bar { get; set; }
}
次のコードで Foo のインスタンスをインスタンス化するにはどうすればよいですか?
ScriptRuntimeSetup setup = Python.CreateRuntimeSetup(null);
ScriptRuntime runtime = new ScriptRuntime(setup);
ScriptEngine engine = Python.GetEngine(runtime);
ScriptScope scope = engine.CreateScope();
string script = @"x = ***???***";
ScriptSource source = engine.CreateScriptSourceFromString(script, SourceCodeKind.Statements);
source.Execute(scope);