Added support for running C# code in a dotnet core environment

This commit is contained in:
Klavs Madsen
2017-01-21 13:57:45 +01:00
parent 8339e120ce
commit f5270d97b1
8 changed files with 369 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
using System;
using System.Reflection;
using System.Collections.Generic;
namespace Fission.DotNetCore.Compiler
{
class Function
{
private readonly MethodInfo _info;
public Function(MethodInfo info)
{
if (info == null) throw new ArgumentNullException(nameof(info));
_info = info;
}
public object Invoke(Dictionary<string, object> args)
{
return _info.Invoke(null, new[] { args });
}
}
}