Couchbase .NET SDK | 3.7.2
Search Results for

    Show / Hide Table of Contents

    Class ClusterOptionsExtensions

    Extensions for ClusterOptions.

    Inheritance
    object
    ClusterOptionsExtensions
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Couchbase
    Assembly: Couchbase.NetClient.dll
    Syntax
    public static class ClusterOptionsExtensions

    Methods

    | Edit this page View Source

    AddClusterService<T>(ClusterOptions, T)

    Register a singleton service with the cluster's ClusterServices.

    Declaration
    public static ClusterOptions AddClusterService<T>(this ClusterOptions clusterOptions, T singleton) where T : notnull
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    T singleton

    Singleton instance which is always returned.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    T

    The type of the service which will be requested and returned.

    | Edit this page View Source

    AddClusterService<TService, TImplementation>(ClusterOptions)

    Register a service with the cluster's ClusterServices using the cluster's lifetime.

    Declaration
    public static ClusterOptions AddClusterService<TService, TImplementation>(this ClusterOptions clusterOptions) where TImplementation : TService
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Edit this page View Source

    AddClusterService<TService, TImplementation>(ClusterOptions, Func<IServiceProvider, TImplementation>)

    Register a service with the cluster's ClusterServices using the cluster's lifetime.

    Declaration
    public static ClusterOptions AddClusterService<TService, TImplementation>(this ClusterOptions clusterOptions, Func<IServiceProvider, TImplementation> factory) where TImplementation : notnull, TService
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    Func<IServiceProvider, TImplementation> factory

    Factory which creates the service the first time it is requested.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Edit this page View Source

    AddClusterService<TService, TImplementation>(ClusterOptions, TImplementation)

    Register a singleton service with the cluster's ClusterServices.

    Declaration
    public static ClusterOptions AddClusterService<TService, TImplementation>(this ClusterOptions clusterOptions, TImplementation singleton) where TImplementation : notnull, TService
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    TImplementation singleton

    Singleton instance which is always returned.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Edit this page View Source

    AddTransientService<TService, TImplementation>(ClusterOptions)

    Register a transient service with the cluster's ClusterServices.

    Declaration
    public static ClusterOptions AddTransientService<TService, TImplementation>(this ClusterOptions clusterOptions) where TImplementation : TService
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    | Edit this page View Source

    AddTransientService<TService, TImplementation>(ClusterOptions, Func<IServiceProvider, TImplementation>)

    Register a transient service with the cluster's ClusterServices.

    Declaration
    public static ClusterOptions AddTransientService<TService, TImplementation>(this ClusterOptions clusterOptions, Func<IServiceProvider, TImplementation> factory) where TImplementation : notnull, TService
    Parameters
    Type Name Description
    ClusterOptions clusterOptions

    The ClusterOptions.

    Func<IServiceProvider, TImplementation> factory

    Factory which creates the service each time it is requested.

    Returns
    Type Description
    ClusterOptions

    The ClusterOptions.

    Type Parameters
    Name Description
    TService

    The type of the service which will be requested.

    TImplementation

    The type of the service implementation which is returned.

    • Edit this page
    • View Source
    In this article
    Back to top © 2025 Couchbase, Inc.