Class RabbitMQProviderServiceCollectionExtensions
- Namespace
- Steeltoe.CloudFoundry.Connector.RabbitMQ
- Assembly
- Steeltoe.CloudFoundry.ConnectorCore.dll
public static class RabbitMQProviderServiceCollectionExtensions
- Inheritance
-
RabbitMQProviderServiceCollectionExtensions
- Inherited Members
Methods
AddRabbitMQConnection(IServiceCollection, IConfiguration, ServiceLifetime, ILoggerFactory, bool)
Add RabbitMQ and its IHealthContributor to a ServiceCollection
public static IServiceCollection AddRabbitMQConnection(this IServiceCollection services, IConfiguration config, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
contextLifetime
ServiceLifetimeLifetime of the service to inject
logFactory
ILoggerFactorylogger factory
addSteeltoeHealthChecks
boolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RabbitMQ.Client.ConnectionFactory is retrievable as both ConnectionFactory and IConnectionFactory
AddRabbitMQConnection(IServiceCollection, IConfiguration, string, ServiceLifetime, ILoggerFactory, bool)
Add RabbitMQ and its IHealthContributor to a ServiceCollection
public static IServiceCollection AddRabbitMQConnection(this IServiceCollection services, IConfiguration config, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
serviceName
stringcloud foundry service name binding
contextLifetime
ServiceLifetimeLifetime of the service to inject
logFactory
ILoggerFactorylogger factory
addSteeltoeHealthChecks
boolAdd Steeltoe healthChecks
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RabbitMQ.Client.ConnectionFactory is retrievable as both ConnectionFactory and IConnectionFactory