Util.Run - return an object from sub query?
Is there any way to return an object when using Util.Run?
I keep getting an error:
I've tried returning a dynamic, an object, and a string, but all fail with the same error.
My subQuery that is being called from another query with Util.Run has signature:
I keep getting an error:
Object of type 'System.Object[]' cannot be converted to type 'System.String[]
I've tried returning a dynamic, an object, and a string, but all fail with the same error.
My subQuery that is being called from another query with Util.Run has signature:
string Main(string[] args)
Comments
First query saved to
C:\PathToSubquery\Subquery.linq
: Second query: Dumps INPUT.async Task<SomeObject> Main()
and returns an object (class is defined in My Extensions).
My second query calls the sub-query like this:
SomeObject result = qryRunner.ReturnValue;
The return value is always null.
@JoeAlbahari is this true? If it is, could there be a warning added when Main returns a non-void/non-serializable type? Presumably Main doing so is specifically so other scripts could call it and would hit this issue AFAICT
Making the type serializable will work only if the type is visible to both scripts (defined in My Extensions or a common assembly).