Skip to content
This repository has been archived by the owner on Jan 27, 2021. It is now read-only.

Can NativeProcedure.Create also process Action<>? #15

Open
axtens opened this issue Aug 28, 2019 · 0 comments
Open

Can NativeProcedure.Create also process Action<>? #15

axtens opened this issue Aug 28, 2019 · 0 comments

Comments

@axtens
Copy link

axtens commented Aug 28, 2019

Currently doing

            Interpreter.CreateSymbolTableDelegate extension = itpr =>
            {
                return new Dictionary<Symbol, object>
                {
                    [Symbol.FromString("exit")] = NativeProcedure.Create<int>(Exit,"exit"),
                };
            };

where Exit is defined as

        private static int Exit()
        {
            System.Environment.Exit(1);
            return 1;
        }

Would be nicer to be able to specify System.Environment.Exit in the .Create

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant