예제 #1
0
파일: Form1.cs 프로젝트: BoykoDmitry/csharp
 public Form1()
 {
     InitializeComponent();
     _scriptHost = new ScriptHost();
     _scriptHost.LoadAssembly(typeof(jterry.scripting.api.IUnitOfWork).Assembly);
     _scriptHost.LoadAssembly(typeof(System.Windows.Forms.Form).Assembly);
     IUnitOfWork uow = new ChinookContext();
     _scriptHost.RegisterVariable("unitOfWork", uow);
 }
예제 #2
0
 private static void RegisterScriptVariable(ScriptHost host, string name, object value)
 {
     host.RegisterVariable(name, value);
 }