Skip to content

Conversation

@Emopusta
Copy link
Contributor

@Emopusta Emopusta commented Aug 28, 2024

Hello,

I was adding multiple behaviors to my project and I didn't want to put my every behavior one by one like this:

services.AddMediatR(configuration =>
        {
            configuration.AddOpenBehavior(typeof(MyBehavior<,>));
            configuration.AddOpenBehavior(typeof(MyBehavior2<,>));
        });

so I decided to create my own AddBehaviors extension to add my behaviors by list at once. I thought this could help others without implementing their own extension.

Furthermore, I noticed there is a optional service lifetime implementation inside AddOpenBehavior so I added another extension with OpenBehavior entity. This helps developer to set every behavior service lifetime individually while registering their behaviors with multiple registration.

@Emopusta
Copy link
Contributor Author

Emopusta commented Sep 4, 2024

@zachpainter77 What is the relevancy between my pull request and your Timeout behavior support #1058 pull request. Can you explain why did you mention as a "direct response" to this pull request?

@zachpainter77
Copy link
Contributor

zachpainter77 commented Sep 10, 2024

@zachpainter77 What is the relevancy between my pull request and your Timeout behavior support #1058 pull request. Can you explain why did you mention as a "direct response" to this pull request?

Sorry I must have been mistaken.. I don't think these are actually related.. I'll remove that from my pr.

Edit: Actually it was a typo I meant to reference #1056

@jbogard jbogard merged commit 585f0dc into LuckyPennySoftware:master Sep 11, 2024
@Emopusta Emopusta deleted the feature/open-behavior-multiple-addition-extension branch September 11, 2024 18:34
@Emopusta Emopusta restored the feature/open-behavior-multiple-addition-extension branch September 11, 2024 18:41
This was referenced Jul 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants