generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.p2This is a standard priority issueThis is a standard priority issuequeued
Description
Describe the feature
The current implementation of MessageBusBuilder.AddAdditionalService allows for services to be added to the underlying ServiceCollection but it would be useful if an overload with an action that includes direct access to MessageConfiguration/IServiceCollection were added.
Use Case
Access to the underlying service collection and message configuration would greatly improve integration of external extensions eg. transactional outbox pattern
Proposed Solution
public class MessageBusBuilder : IMessageBusBuilder
{
...
private readonly IList<Action<IMessageConfiguration, IServiceCollection>> _additionalServices = new List<Action<IMessagBusBuilder, IServiceCollection>>();
public IMessageBusBuilder AddAdditionalService(ServiceDescriptor serviceDescriptor)
{
_additionalServices.Add((_, services) => services.TryAdd(service));
return this;
}
public IMessageBusBuilder AddAdditionalService(Action<IMessageConfiguration, IServiceCollection> action)
{
_additionalServices.Add(action);
return this;
}
internal void Build()
{
...
foreach (var action in _additionalServices)
{
action.Invoke(_messageConfiguration, _serviceCollection);
}
}
}Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS.Messaging (or related) package versions
AWS.Messaging
Targeted .NET Platform
all
Operating System and version
all
Metadata
Metadata
Assignees
Labels
feature-requestA feature should be added or improved.A feature should be added or improved.p2This is a standard priority issueThis is a standard priority issuequeued