Actually pass script reference if requested

This commit is contained in:
Deukhoofd 2018-11-30 12:09:06 +01:00
parent 1243492453
commit 81a6b05b26
No known key found for this signature in database
GPG Key ID: B4C087AC81641654
1 changed files with 2 additions and 0 deletions

View File

@ -37,6 +37,8 @@ namespace Upsilon.BaseTypes.ScriptFunction
$"and parameter types: {string.Join(", ", types.Select(x => $"'{x.Name}'"))}"); $"and parameter types: {string.Join(", ", types.Select(x => $"'{x.Name}'"))}");
} }
var objects = new List<object>(); var objects = new List<object>();
if (_passScriptReference)
objects.Add(script);
objects.AddRange(_directTypeManipulation objects.AddRange(_directTypeManipulation
? variables.Select(x => (object) x).ToList() ? variables.Select(x => (object) x).ToList()
: variables.Select(x => x.ToCSharpObject()).ToList()); : variables.Select(x => x.ToCSharpObject()).ToList());