Class ServiceCollectionExtensions
- Assembly
- Cuemon.Extensions.AspNetCore.dll
Extension methods for the IServiceCollection interface.
public static class ServiceCollectionExtensions
- Inheritance
-
ServiceCollectionExtensions
Methods
AddMemoryThrottlingCache(IServiceCollection)
Adds a MemoryThrottlingCache service to the specified IServiceCollection.
public static IServiceCollection AddMemoryThrottlingCache(this IServiceCollection services)
Parameters
services
IServiceCollectionThe IServiceCollection to add services to.
Returns
- IServiceCollection
An IServiceCollection that can be used to further configure other services.
AddThrottlingCache<T>(IServiceCollection)
Adds a throttling cache service to the specified IServiceCollection.
public static IServiceCollection AddThrottlingCache<T>(this IServiceCollection services)
where T : class, IThrottlingCache
Parameters
services
IServiceCollectionThe IServiceCollection to add services to.
Returns
- IServiceCollection
An IServiceCollection that can be used to further configure other services.
Type Parameters
T
AddThrottlingSentinelOptions(IServiceCollection, Action<ThrottlingSentinelOptions>)
Adds configuration of ThrottlingSentinelOptions for the application.
public static IServiceCollection AddThrottlingSentinelOptions(this IServiceCollection services, Action<ThrottlingSentinelOptions> setup = null)
Parameters
services
IServiceCollectionThe IServiceCollection to extend.
setup
Action<ThrottlingSentinelOptions>The ThrottlingSentinelOptions which may be configured.
Returns
- IServiceCollection
A reference to
services
so that additional configuration calls can be chained.
Exceptions
- ArgumentNullException
services
cannot be null.- ArgumentException
setup
failed to configure an instance of ThrottlingSentinelOptions in a valid state.