Table of Contents

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 IDataCommand

The data command.

stream Stream

The destination for writing JSON text.

options JsonWriterOptions

The 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 IDataCommand

The data command.

options JsonWriterOptions

The 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 IDataCommand

The data command.

stream Stream

The destination for writing JSON text.

options JsonWriterOptions

The JsonWriterOptions options.

cancellationToken CancellationToken

The 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 IDataCommand

The data command.

options JsonWriterOptions

The JsonWriterOptions options.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<string>

A JSON string representing the IDataReader result of the command.