Rework of function calling to handle generics better
This commit is contained in:
@@ -49,13 +49,11 @@ namespace Upsilon.BaseTypes.ScriptFunction
|
||||
objects.Add(script);
|
||||
if (_passScopeReference)
|
||||
objects.Add(scope);
|
||||
objects.AddRange(_directTypeManipulation
|
||||
? variables.Select(x => (object) x).ToList()
|
||||
: variables.Select(x => x.ToCSharpObject()).ToList());
|
||||
objects.AddRange(variables.Select(x => (object) x).ToList() );
|
||||
object result;
|
||||
try
|
||||
{
|
||||
result = _object.GetType().InvokeMember(_method.Name, BindingFlags.InvokeMethod, System.Type.DefaultBinder,
|
||||
result = _object.GetType().InvokeMember(_method.Name, BindingFlags.InvokeMethod, UpsilonBinder.Default,
|
||||
_object, objects.ToArray());
|
||||
}
|
||||
catch (TargetInvocationException e)
|
||||
|
||||
Reference in New Issue
Block a user