Class MessageSerializerProvider
Default message command to message serializer map.
Implements
Namespace: TehGM.Wolfringo.Messages.Serialization
Assembly: Wolfringo.Core.dll
Syntax
public class MessageSerializerProvider : ISerializerProvider<string, IMessageSerializer>
Remarks
This class contains all Wolfringo library default message 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 MessageSerializerProviderOptions via the constructor.
Constructors
| Improve this Doc View SourceMessageSerializerProvider()
Create a new instance of default provider with default options.
Declaration
public MessageSerializerProvider()
MessageSerializerProvider(MessageSerializerProviderOptions)
Create a new instance of default provider.
Declaration
public MessageSerializerProvider(MessageSerializerProviderOptions options)
Parameters
Type | Name | Description |
---|---|---|
MessageSerializerProviderOptions | options | 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 IMessageSerializer FallbackSerializer { get; }
Property Value
Type | Description |
---|---|
IMessageSerializer |
Options
Instance of options used by this provider.
Declaration
protected MessageSerializerProviderOptions Options { get; }
Property Value
Type | Description |
---|---|
MessageSerializerProviderOptions |
Methods
| Improve this Doc View SourceGetSerializer(String)
Gets serializer mapped to the key.
Declaration
public IMessageSerializer GetSerializer(string key)
Parameters
Type | Name | Description |
---|---|---|
String | key |
Returns
Type | Description |
---|---|
IMessageSerializer | Found serializer. |