|
|
|
@ -13,7 +13,7 @@ namespace Volo.Abp.RabbitMQ |
|
|
|
[NotNull] |
|
|
|
public ConnectionFactory Default |
|
|
|
{ |
|
|
|
get => this.GetOrDefault(DefaultConnectionName); |
|
|
|
get => this[DefaultConnectionName]; |
|
|
|
set => this[DefaultConnectionName] = Check.NotNull(value, nameof(value)); |
|
|
|
} |
|
|
|
|
|
|
|
@ -21,5 +21,15 @@ namespace Volo.Abp.RabbitMQ |
|
|
|
{ |
|
|
|
Default = new ConnectionFactory(); |
|
|
|
} |
|
|
|
|
|
|
|
public ConnectionFactory GetOrDefault(string connectionName) |
|
|
|
{ |
|
|
|
if (TryGetValue(connectionName, out var connectionFactory)) |
|
|
|
{ |
|
|
|
return connectionFactory; |
|
|
|
} |
|
|
|
|
|
|
|
return Default; |
|
|
|
} |
|
|
|
} |
|
|
|
} |