Table of Contents

Interface ICommandParamsParser<TArgs>

Namespace
RDCore.SDK.Server.Commands
Assembly
RDCore.SDK.dll

A service that parses a Newtonsoft.Json.Linq.JArray input into a strongly-typed command parameters object.

public interface ICommandParamsParser<out TArgs> where TArgs : class, new()

Type Parameters

TArgs

The record/class type to parse the command parameters into.

Methods

Parse(JArray?)

Parses the provided Newtonsoft.Json.Linq.JArray request body content into a command parameter object of the specified TArgs type.

TArgs? Parse(JArray? args)

Parameters

args JArray

The raw Newtonsoft.Json.Linq.JArray command parameter received from the client request.

Returns

TArgs

null if the provided Newtonsoft.Json.Linq.JArray cannot be parsed into the specified TArgs type.