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

    Class ResponseSerializerProvider

    Default response type to response serializer map.

    Inheritance
    System.Object
    ResponseSerializerProvider
    Implements
    ISerializerProvider<System.Type, IResponseSerializer>
    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 Source

    ResponseSerializerProvider()

    Creates default response serializer map with default options.

    Declaration
    public ResponseSerializerProvider()
    | Improve this Doc View Source

    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 Source

    FallbackSerializer

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

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

    Options

    Instance of options used by this provider.

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

    Methods

    | Improve this Doc View Source

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

    Implements

    ISerializerProvider<TKey, TSerializer>

    Extension Methods

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