Wolfringo Wolfringo
Wolfringo Wolfringo
Wolfringo (c) 2020 TehGM
DocFX, DiscordFX theme.
Search Results for

    Class MessageSerializerProvider

    Default message command to message serializer map.

    Inheritance
    System.Object
    MessageSerializerProvider
    Implements
    ISerializerProvider<System.String, IMessageSerializer>
    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 Source

    MessageSerializerProvider()

    Create a new instance of default provider with default options.

    Declaration
    public MessageSerializerProvider()
    | Improve this Doc View Source

    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 Source

    FallbackSerializer

    Fallback serializer that can be used if key has no mapped serializer.

    Declaration
    public IMessageSerializer FallbackSerializer { get; }
    Property Value
    Type Description
    IMessageSerializer
    | Improve this Doc View Source

    Options

    Instance of options used by this provider.

    Declaration
    protected MessageSerializerProviderOptions Options { get; }
    Property Value
    Type Description
    MessageSerializerProviderOptions

    Methods

    | Improve this Doc View Source

    GetSerializer(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.

    Implements

    ISerializerProvider<TKey, TSerializer>

    Extension Methods

    SerializerProviderExtensions.GetSerializer<TKey, TSerializer>(ISerializerProvider<TKey, TSerializer>, TKey)
    SerializerProviderExtensions.TryFindSerializer<TKey, TSerializer>(ISerializerProvider<TKey, TSerializer>, TKey, out TSerializer)