With the following files in bin:
- ScriptCs.FooPack.dll
- ScriptCs.Contracts.dll
Yields the following output:
INFO : Starting to create execution components
INFO : Starting execution
Hello from Foo!
INFO : Finished execution
namespace ScriptCs.FooPack | |
{ | |
public class FooScriptPack : IScriptPack | |
{ | |
public void Initialize(IScriptPackSession session) { } | |
public IScriptPackContext GetContext() | |
{ | |
return new FooPack(); | |
} | |
public void Terminate() { } | |
} | |
public class FooPack : IScriptPackContext | |
{ | |
public void SayHello() | |
{ | |
Console.WriteLine("Hello from Foo!"); | |
} | |
} | |
} |
var foo = Require<FooPack>(); | |
foo.SayHello(); |