public static IMemcachedConfigurationBuilder UseNodeLocator <TService>(this IMemcachedConfigurationBuilder builder) where TService : class, INodeLocator { builder.Services.AddTransient <INodeLocator, TService>(); return(builder); }
public static IMemcachedConfigurationBuilder SetOptions(this IMemcachedConfigurationBuilder builder, ISocketOptions options) { builder.Services.AddSingleton(options); builder.Services.AddTransient <ISocketFactory, AsyncSocketFactory>(); return(builder); }
public static IMemcachedConfigurationBuilder UseItemFormatter <TService>(this IMemcachedConfigurationBuilder builder) where TService : class, IItemFormatter { builder.Services.AddTransient <IItemFormatter, TService>(); return(builder); }
public static IMemcachedConfigurationBuilder UseSocketFactory <TService>(this IMemcachedConfigurationBuilder builder) where TService : class, ISocketFactory { builder.Services.AddTransient <ISocketFactory, TService>(); return(builder); }
public static IMemcachedConfigurationBuilder UseFailurePolicyFactory(this IMemcachedConfigurationBuilder builder, Func <IServiceProvider, IFailurePolicyFactory> implementationFactory) { builder.Services.AddTransient(implementationFactory); return(builder); }
public static IMemcachedConfigurationBuilder UseNodeLocator(this IMemcachedConfigurationBuilder builder, Func <IServiceProvider, INodeLocator> implementationFactory) { builder.Services.AddTransient(implementationFactory); return(builder); }
public static IMemcachedConfigurationBuilder SetOptions(this IMemcachedConfigurationBuilder builder, IMemcachedClientOptions options) { builder.Services.AddSingleton(options); return(builder); }