diff --git a/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs b/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs index 77104e8b65..8195c93f7d 100644 --- a/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs +++ b/src/Components/Aspire.RabbitMQ.Client/AspireRabbitMQExtensions.cs @@ -32,9 +32,9 @@ public static class AspireRabbitMQExtensions /// The to read config from and add services to. /// A name used to retrieve the connection string from the ConnectionStrings configuration section. /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. + /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. /// Reads the configuration from "Aspire:RabbitMQ:Client" section. - public static void AddRabbitMQ(this IHostApplicationBuilder builder, string connectionName, Action? configureSettings = null, Action? configureConnectionFactory = null) + public static void AddRabbitMQ(this IHostApplicationBuilder builder, string connectionName, Action? configureSettings = null, Action? configureConnectionFactory = null) => AddRabbitMQ(builder, DefaultConfigSectionName, configureSettings, configureConnectionFactory, connectionName, serviceKey: null); /// @@ -44,9 +44,9 @@ public static void AddRabbitMQ(this IHostApplicationBuilder builder, string conn /// The to read config from and add services to. /// The name of the component, which is used as the of the service and also to retrieve the connection string from the ConnectionStrings configuration section. /// An optional method that can be used for customizing the . It's invoked after the settings are read from the configuration. - /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. + /// An optional method that can be used for customizing the . It's invoked after the options are read from the configuration. /// Reads the configuration from "Aspire:RabbitMQ:Client:{name}" section. - public static void AddKeyedRabbitMQ(this IHostApplicationBuilder builder, string name, Action? configureSettings = null, Action? configureConnectionFactory = null) + public static void AddKeyedRabbitMQ(this IHostApplicationBuilder builder, string name, Action? configureSettings = null, Action? configureConnectionFactory = null) { ArgumentException.ThrowIfNullOrEmpty(name); @@ -57,7 +57,7 @@ private static void AddRabbitMQ( IHostApplicationBuilder builder, string configurationSectionName, Action? configureSettings, - Action? configureConnectionFactory, + Action? configureConnectionFactory, string connectionName, object? serviceKey) { @@ -172,7 +172,7 @@ private static IConnection CreateConnection(IConnectionFactory factory, int retr if (connectAttemptActivity is not null) { connectAttemptActivity.AddTag("exception.message", ex.Message); - // Note that "exception.stacktrace" is the full exception detail, not just the StackTrace property. + // Note that "exception.stacktrace" is the full exception detail, not just the StackTrace property. // See https://opentelemetry.io/docs/specs/semconv/attributes-registry/exception/ // and https://github.com/open-telemetry/opentelemetry-specification/pull/697#discussion_r453662519 connectAttemptActivity.AddTag("exception.stacktrace", ex.ToString()); diff --git a/src/Components/Aspire.RabbitMQ.Client/README.md b/src/Components/Aspire.RabbitMQ.Client/README.md index faaf84b3da..c511426460 100644 --- a/src/Components/Aspire.RabbitMQ.Client/README.md +++ b/src/Components/Aspire.RabbitMQ.Client/README.md @@ -83,7 +83,7 @@ Also you can pass the `Action configureSettings` delegat builder.AddRabbitMQ("messaging", settings => settings.HealthChecks = false); ``` -You can also setup the [IConnectionFactory](https://rabbitmq.github.io/rabbitmq-dotnet-client/api/RabbitMQ.Client.IConnectionFactory.html) using the `Action configureConnectionFactory` delegate parameter of the `AddRabbitMQ` method. For example to set the client provided name for connections: +You can also setup the [ConnectionFactory](https://rabbitmq.github.io/rabbitmq-dotnet-client/api/RabbitMQ.Client.ConnectionFactory.html) using the `Action configureConnectionFactory` delegate parameter of the `AddRabbitMQ` method. For example to set the client provided name for connections: ```csharp builder.AddRabbitMQ("messaging", configureConnectionFactory: factory => factory.ClientProvidedName = "MyApp");