Class JsonCommandExtensions
- Namespace
- FluentCommand
- Assembly
- FluentCommand.Json.dll
Extension methods for IDataCommand
public static class JsonCommandExtensions
- Inheritance
-
JsonCommandExtensions
- Inherited Members
Methods
QueryJson(IDataCommand, Stream, JsonWriterOptions)
Executes the query and returns a JSON string from data set returned by the query.
public static void QueryJson(this IDataCommand dataCommand, Stream stream, JsonWriterOptions options = default)
Parameters
dataCommand
IDataCommandThe data command.
stream
StreamThe destination for writing JSON text.
options
JsonWriterOptionsThe JsonWriterOptions options.
QueryJson(IDataCommand, JsonWriterOptions)
Executes the query and returns a JSON string from data set returned by the query.
public static string QueryJson(this IDataCommand dataCommand, JsonWriterOptions options = default)
Parameters
dataCommand
IDataCommandThe data command.
options
JsonWriterOptionsThe JsonWriterOptions options.
Returns
- string
A JSON string representing the IDataReader result of the command.
QueryJsonAsync(IDataCommand, Stream, JsonWriterOptions, CancellationToken)
Executes the query and returns a JSON string from data set returned by the query asynchronously.
public static Task QueryJsonAsync(this IDataCommand dataCommand, Stream stream, JsonWriterOptions options = default, CancellationToken cancellationToken = default)
Parameters
dataCommand
IDataCommandThe data command.
stream
StreamThe destination for writing JSON text.
options
JsonWriterOptionsThe JsonWriterOptions options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task
A JSON string representing the IDataReader result of the command.
QueryJsonAsync(IDataCommand, JsonWriterOptions, CancellationToken)
Executes the query and returns a JSON string from data set returned by the query asynchronously.
public static Task<string> QueryJsonAsync(this IDataCommand dataCommand, JsonWriterOptions options = default, CancellationToken cancellationToken = default)
Parameters
dataCommand
IDataCommandThe data command.
options
JsonWriterOptionsThe JsonWriterOptions options.
cancellationToken
CancellationTokenThe cancellation token.
Returns
- Task<string>
A JSON string representing the IDataReader result of the command.