Class ResponseSerializerProvider
Default response type to response serializer map.
Implements
Namespace: TehGM.Wolfringo.Messages.Serialization
Assembly: Wolfringo.Core.dll
Syntax
public class ResponseSerializerProvider : ISerializerProvider<Type, IResponseSerializer>
Remarks
This class contains all Wolfringo library default response mappings, and will be used by default clients if no other map is provided.
This class can be easily extended without inheritance. To provide custom mappings, pass your own instance of ResponseSerializerProviderOptions via the constructor.
Constructors
| Improve this Doc View SourceResponseSerializerProvider()
Creates default response serializer map with default options.
Declaration
public ResponseSerializerProvider()
ResponseSerializerProvider(ResponseSerializerProviderOptions)
Creates default response serializer map.
Declaration
public ResponseSerializerProvider(ResponseSerializerProviderOptions options)
Parameters
Type | Name | Description |
---|---|---|
ResponseSerializerProviderOptions | options | Instance of options to use with this provider. |
Properties
| Improve this Doc View SourceFallbackSerializer
Fallback serializer that can be used if key has no mapped serializer.
Declaration
public IResponseSerializer FallbackSerializer { get; }
Property Value
Type | Description |
---|---|
IResponseSerializer |
Options
Instance of options used by this provider.
Declaration
protected ResponseSerializerProviderOptions Options { get; }
Property Value
Type | Description |
---|---|
ResponseSerializerProviderOptions |
Methods
| Improve this Doc View SourceGetSerializer(Type)
Gets serializer mapped to the key.
Declaration
public IResponseSerializer GetSerializer(Type key)
Parameters
Type | Name | Description |
---|---|---|
Type | key |
Returns
Type | Description |
---|---|
IResponseSerializer | Found serializer. |