Skip to content

Instantly share code, notes, and snippets.

@khellang
Last active December 17, 2015 05:58
Show Gist options
  • Save khellang/5561508 to your computer and use it in GitHub Desktop.
Save khellang/5561508 to your computer and use it in GitHub Desktop.

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();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment