Interface ICommandParamsParser<TArgs>
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
TArgsThe 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
argsJArrayThe raw Newtonsoft.Json.Linq.JArray command parameter received from the client request.
Returns
- TArgs
nullif the provided Newtonsoft.Json.Linq.JArray cannot be parsed into the specifiedTArgstype.