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