Jint.Delegates Not Found (How to pass Func<TReturn>)

Nov 10, 2014 at 12:34 PM

I am trying to pass a function (Func<bool>) from jint to c#. My JS script passes a function (function() { return true; }) - but i am unable to map that in c# to a type of func<bool>

A little reading indicated something in the Jint engine that implied there were a pre-defined set of delegates (Jint.Delegates.) but I can't seem to find that.

Am i missing something here or just being a bit stupid?

c# class
class Options {
    public Func<bool> OnAnswer {get;set;}
JS Code:
SomeMethod("", { OnAnswer: function() {
    return Get("uri", "#", 1, 5) == "1";
You're help would be greatly appreciated.