Skip to content
This repository was archived by the owner on Jun 3, 2023. It is now read-only.

HttpParamAssignmentFilter

Jussi Saarivirta edited this page Jan 26, 2019 · 1 revision

HttpParamAssignmentFilter

The main class responsible for the actual parameter assignment. This class implements IFunctionInvocationFilter and contains the default deserialization code for HTTP request parameters. It uses the IHttpParamValueDeserializer implementation for deserialization if one exists.

The default deserialization is done using Newtonsoft.Json JsonConvert, and in the case of deserializing XML body content the System.Xml.Serialization.XmlSerializer is used.

Deserialization of objects (classes), primitives and lists and arrays is supported. This means you can use a host of types in the HttpParam generic argument:

HttpParam<List<int>> ints;
HttpParam<long[]> longs;
HttpParam<MyClass> myClass;
HttpParam<List<MyClass>> myClasses;
HttpParam<string> myString;

If you wish to support more types you can also create your own deserializer implementation by implementing the IHttpParamValueDeserializer interface.

Clone this wiki locally