Added support for running C# code in a dotnet core environment
This commit is contained in:
@@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user