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

    Class DefaultResponseSerializer

    Serializer for basic responses that don't have binary data.

    Inheritance
    System.Object
    DefaultResponseSerializer
    ChatHistoryResponseSerializer
    ChatUpdateResponseSerializer
    GroupEditResponseSerializer
    GroupProfileResponseSerializer
    GroupStatisticsResponseSerializer
    TipDetailsResponseSerializer
    UserUpdateResponseSerializer
    Implements
    IResponseSerializer
    Namespace: TehGM.Wolfringo.Messages.Serialization
    Assembly: Wolfringo.Core.dll
    Syntax
    public class DefaultResponseSerializer : IResponseSerializer

    Methods

    | Improve this Doc View Source

    Deserialize(Type, SerializedMessageData)

    Deserialize a server response.

    Declaration
    public virtual IWolfResponse Deserialize(Type responseType, SerializedMessageData responseData)
    Parameters
    Type Name Description
    System.Type responseType

    Type of the response to deserialize into.

    SerializedMessageData responseData

    Serialized response data.

    Returns
    Type Description
    IWolfResponse

    Deserialized response.

    | Improve this Doc View Source

    GetResponseJson(JToken)

    Gets response json, stripping off wrapping array.

    Declaration
    protected static JToken GetResponseJson(JToken payload)
    Parameters
    Type Name Description
    Newtonsoft.Json.Linq.JToken payload

    JSON response payload.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JToken

    Core response payload.

    | Improve this Doc View Source

    GetResponseJson(SerializedMessageData)

    Gets response json, stripping off wrapping array.

    Declaration
    protected static JToken GetResponseJson(SerializedMessageData responseData)
    Parameters
    Type Name Description
    SerializedMessageData responseData

    Serialized response data.

    Returns
    Type Description
    Newtonsoft.Json.Linq.JToken

    Core response payload.

    | Improve this Doc View Source

    ThrowIfInvalidType(Type)

    Throws if response type is not supported by this serializer.

    Declaration
    protected virtual void ThrowIfInvalidType(Type responseType)
    Parameters
    Type Name Description
    System.Type responseType

    Type of the response.

    Implements

    IResponseSerializer