@@ -11,6 +11,9 @@ internal abstract class ApiClientBase(HttpClient httpClient, ILogger<ICgScriptAp
1111 public async Task < ScriptResult < TR > > Execute < TP , TR > ( string scriptName , TP parameter , JsonTypeInfo < TP > callJsonTypeInfo , JsonTypeInfo < TR > resultJsonTypeInfo , CancellationToken cancellationToken ) =>
1212 await ParseResponse ( await httpClient . PostAsync ( await GetPath ( scriptName ) , await GetJsonContent ( scriptName , parameter , callJsonTypeInfo ) , cancellationToken ) . ConfigureAwait ( false ) , resultJsonTypeInfo , cancellationToken ) ;
1313
14+ public async Task < ScriptResult < TR > > ExecuteArray < TP , TR > ( string scriptName , TP parameter , JsonTypeInfo < TP > callJsonTypeInfo , JsonTypeInfo < TR > resultJsonTypeInfo , CancellationToken cancellationToken ) =>
15+ await ParseResponse ( await httpClient . PostAsync ( await GetPath ( scriptName , "?expandParameters=true" ) , await GetJsonContent ( scriptName , parameter , callJsonTypeInfo ) , cancellationToken ) . ConfigureAwait ( false ) , resultJsonTypeInfo , cancellationToken ) ;
16+
1417 public async Task < ScriptResult < TR > > Execute < TR > ( string scriptName , JsonTypeInfo < TR > resultJsonTypeInfo , CancellationToken cancellationToken = default ) =>
1518 await ParseResponse ( await httpClient . PostAsync ( await GetPath ( scriptName , "?expandParameters=true" ) , await GetJsonContent ( scriptName , null , ( JsonTypeInfo < object > ) null ! ) , cancellationToken ) . ConfigureAwait ( false ) , resultJsonTypeInfo , cancellationToken ) ;
1619
@@ -30,6 +33,9 @@ private async Task<ScriptResult<TR>> ParseResponse<TR>(HttpResponseMessage call,
3033 [ RequiresUnreferencedCode ( "JSON" ) ]
3134 public async Task < ScriptResult < TR > > Execute < TP , TR > ( string scriptName , TP parameter , JsonSerializerOptions ? options , CancellationToken cancellationToken = default ) =>
3235 await ParseResponse < TR > ( await httpClient . PostAsync ( await GetPath ( scriptName ) , await GetJsonContent ( scriptName , parameter , options ) , cancellationToken ) . ConfigureAwait ( false ) , options , cancellationToken ) ;
36+ [ RequiresUnreferencedCode ( "JSON" ) ]
37+ public async Task < ScriptResult < TR > > ExecuteArray < TP , TR > ( string scriptName , TP parameter , JsonSerializerOptions ? options , CancellationToken cancellationToken = default ) =>
38+ await ParseResponse < TR > ( await httpClient . PostAsync ( await GetPath ( scriptName , "?expandParameters=true" ) , await GetJsonContent ( scriptName , parameter , options ) , cancellationToken ) . ConfigureAwait ( false ) , options , cancellationToken ) ;
3339
3440 [ RequiresUnreferencedCode ( "JSON" ) ]
3541 public async Task < ScriptResult < TR > > Execute < TR > ( string scriptName , IReadOnlyCollection < object > parameters , JsonSerializerOptions ? options = null , CancellationToken cancellationToken = default ) =>
0 commit comments