Class ResponseSerializerProvider
Default response type to response serializer map.
Inheritance
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()
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.
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. |
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.
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 |
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.
Options
Instance of options used by this provider.
Declaration
protected ResponseSerializerProviderOptions Options { get; }
Property Value
| Type | Description |
|---|---|
| ResponseSerializerProviderOptions |
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.
Methods
| Improve this Doc View SourceGetSerializer(Type)
Gets serializer mapped to the key.
Declaration
public IResponseSerializer GetSerializer(Type key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Type | key |
Returns
| Type | Description |
|---|---|
| IResponseSerializer | Found serializer. |
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.