Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            var test = new Repl();

            // not the most beautiful way of exposing something to the scripting,
            // but having access to the methodinfo on the other end is neato.
            // we'll think of something.
            var mi = typeof(Program)
                     .GetMethods(BindingFlags.Static | BindingFlags.NonPublic)
                     .First(m => m.Name == "TestFunc");

            test.BindMethod("test-func", mi, null);

            test.Main();
        }