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

    Class WolfClientServiceCollectionExtensions

    Dependency Injection extensions for HostedWolfClient.

    Inheritance
    System.Object
    WolfClientServiceCollectionExtensions
    Namespace: Microsoft.Extensions.DependencyInjection
    Assembly: Wolfringo.Hosting.dll
    Syntax
    public static class WolfClientServiceCollectionExtensions

    Methods

    | Improve this Doc View Source

    AddWolfClient(IServiceCollection, Action<HostedWolfClientOptions>)

    Adds Hosted Wolf Client to services as a hosted service, and all related services.

    Declaration
    public static IHostedWolfClientServiceBuilder AddWolfClient(this IServiceCollection services, Action<HostedWolfClientOptions> configureOptions = null)
    Parameters
    Type Name Description
    Microsoft.Extensions.DependencyInjection.IServiceCollection services

    Service collection to add new services to.

    System.Action<HostedWolfClientOptions> configureOptions

    Configuration of client options.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    Remarks

    This method will also add IWolfTokenProvider, IResponseTypeResolver, and ISerializerProvider<TKey, TSerializer> for messages and responses, unless already added.

    Added client will be injectable as both HostedWolfClient and IWolfClient.

    | Improve this Doc View Source

    DisableAutoReconnect(IHostedWolfClientServiceBuilder)

    Disables auto-reconnect behaviour.

    Declaration
    public static IHostedWolfClientServiceBuilder DisableAutoReconnect(this IHostedWolfClientServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    AutoReconnectAttempts
    | Improve this Doc View Source

    MapMessageSerializer(IHostedWolfClientServiceBuilder, String, IMessageSerializer)

    Maps a message serializer in Message Serializer Provider.

    Declaration
    public static IHostedWolfClientServiceBuilder MapMessageSerializer(this IHostedWolfClientServiceBuilder builder, string eventName, IMessageSerializer serializer)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.String eventName

    Name of WOLF protocol event. MessageEventNames for known constants.

    IMessageSerializer serializer

    Serializer to serialize and deserialize with.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    MessageSerializerProvider
    ISerializerProvider<TKey, TSerializer>
    IMessageSerializer
    Serializers
    | Improve this Doc View Source

    MapResponseSerializer(IHostedWolfClientServiceBuilder, Type, IResponseSerializer)

    Maps a response serializer in Message Response Provider.

    Declaration
    public static IHostedWolfClientServiceBuilder MapResponseSerializer(this IHostedWolfClientServiceBuilder builder, Type responseType, IResponseSerializer serializer)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.Type responseType

    Type of response message.

    IResponseSerializer serializer

    Serializer to serialize and deserialize with.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    ResponseSerializerProvider
    ISerializerProvider<TKey, TSerializer>
    IResponseSerializer
    Serializers
    | Improve this Doc View Source

    SetAutoReconnect(IHostedWolfClientServiceBuilder, Int32, TimeSpan)

    Sets auto-reconnect behaviour.

    Declaration
    public static IHostedWolfClientServiceBuilder SetAutoReconnect(this IHostedWolfClientServiceBuilder builder, int attempts, TimeSpan delay)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.Int32 attempts

    Max reconnect attempts. 0 to disable. Negative values to infinite.

    System.TimeSpan delay

    Delay between autoreconnect attempts.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    AutoReconnectAttempts
    AutoReconnectDelay
    | Improve this Doc View Source

    SetAutoReconnectAttempts(IHostedWolfClientServiceBuilder, Int32)

    Sets max auto-reconnect attempts.

    Declaration
    public static IHostedWolfClientServiceBuilder SetAutoReconnectAttempts(this IHostedWolfClientServiceBuilder builder, int attempts)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.Int32 attempts

    Max reconnect attempts. 0 to disable. Negative values to infinite.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    AutoReconnectAttempts
    | Improve this Doc View Source

    SetAutoReconnectDelay(IHostedWolfClientServiceBuilder, TimeSpan)

    Sets delay between auto-reconnect attempts.

    Declaration
    public static IHostedWolfClientServiceBuilder SetAutoReconnectDelay(this IHostedWolfClientServiceBuilder builder, TimeSpan delay)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.TimeSpan delay

    Delay between autoreconnect attempts.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    AutoReconnectDelay
    | Improve this Doc View Source

    SetBetaServerURL(IHostedWolfClientServiceBuilder)

    Sets server URL to Release Candidate server.

    Declaration
    public static IHostedWolfClientServiceBuilder SetBetaServerURL(this IHostedWolfClientServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    ServerURL
    BetaServerURL
    | Improve this Doc View Source

    SetCredentials(IHostedWolfClientServiceBuilder, String, String, WolfLoginType)

    Sets login credentials.

    Declaration
    public static IHostedWolfClientServiceBuilder SetCredentials(this IHostedWolfClientServiceBuilder builder, string login, string password, WolfLoginType loginType = WolfLoginType.Email)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.String login

    Login.

    System.String password

    Password.

    WolfLoginType loginType

    Login Type.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    LoginUsername
    LoginPassword
    LoginType
    | Improve this Doc View Source

    SetDefaultServerURL(IHostedWolfClientServiceBuilder)

    Sets server URL to Default.

    Declaration
    public static IHostedWolfClientServiceBuilder SetDefaultServerURL(this IHostedWolfClientServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    ServerURL
    DefaultServerURL
    | Improve this Doc View Source

    SetFallbackMessageSerializer(IHostedWolfClientServiceBuilder, IMessageSerializer)

    Sets fallback message serializer in Message Serializer Provider.

    Declaration
    public static IHostedWolfClientServiceBuilder SetFallbackMessageSerializer(this IHostedWolfClientServiceBuilder builder, IMessageSerializer serializer)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    IMessageSerializer serializer

    Message serializer to fall back to.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    MessageSerializerProvider
    ISerializerProvider<TKey, TSerializer>
    IMessageSerializer
    FallbackSerializer
    | Improve this Doc View Source

    SetFallbackResponseSerializer(IHostedWolfClientServiceBuilder, IResponseSerializer)

    Sets fallback response serializer in Message Response Provider.

    Declaration
    public static IHostedWolfClientServiceBuilder SetFallbackResponseSerializer(this IHostedWolfClientServiceBuilder builder, IResponseSerializer serializer)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    IResponseSerializer serializer

    Response serializer to fall back to.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    ResponseSerializerProvider
    ISerializerProvider<TKey, TSerializer>
    IResponseSerializer
    FallbackSerializer
    | Improve this Doc View Source

    SetInfiniteAutoReconnectAttempts(IHostedWolfClientServiceBuilder)

    Sets infinite auto-reconnect attempts.

    Declaration
    public static IHostedWolfClientServiceBuilder SetInfiniteAutoReconnectAttempts(this IHostedWolfClientServiceBuilder builder)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    AutoReconnectAttempts
    | Improve this Doc View Source

    SetServerURL(IHostedWolfClientServiceBuilder, String)

    Sets server URL to connect to.

    Declaration
    public static IHostedWolfClientServiceBuilder SetServerURL(this IHostedWolfClientServiceBuilder builder, string url)
    Parameters
    Type Name Description
    IHostedWolfClientServiceBuilder builder

    Hosted WOLF Client Service builder.

    System.String url

    URL of WOLF servers.

    Returns
    Type Description
    IHostedWolfClientServiceBuilder
    See Also
    ServerURL