Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate for Null Requests and throw strong typed exception #37

Closed
ivanpaulovich opened this issue Oct 18, 2019 · 8 comments
Closed

Validate for Null Requests and throw strong typed exception #37

ivanpaulovich opened this issue Oct 18, 2019 · 8 comments
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@ivanpaulovich
Copy link
Owner

Please failfast when the developer tries to publish/send null objects. The following code should be updated:

public async Task PublishAsync(object request)
{
// validate for null requests
    var pipeline = _pipelines.GetAsyncPipeline(request.GetType()); 
    await pipeline.PublishAsync(GetService, request!);
}        
@ivanpaulovich ivanpaulovich added bug Something isn't working good first issue Good for newcomers labels Oct 18, 2019
@ivanpaulovich ivanpaulovich added this to the alpha milestone Oct 18, 2019
@hadijahangiri
Copy link

May i start working on this?

@ivanpaulovich
Copy link
Owner Author

It would be nice @hadijahangiri :)

@hadijahangiri
Copy link

tnx

ivanpaulovich added a commit that referenced this issue Oct 21, 2019
ivanpaulovich added a commit that referenced this issue Oct 21, 2019
@ivanpaulovich
Copy link
Owner Author

Hey @hadijahangiri, I found the time to create PR which adds validation for null request. You may see the changes here b3d03b1

I wonder if you are interested in creating samples to showcase the project. What do you say?

@hadijahangiri
Copy link

sorry about my delay. very good.
I like to contribute in your project

@ivanpaulovich
Copy link
Owner Author

No problem! Take your time :)

What is more in need is a real sample application. There are good projects in GitHub using MediatR that I wish to implement using FluentMediator. Like the following:

https://github.com/miltoncamara/mediatr-netcore-sample

@hadijahangiri
Copy link

I try to use MediatR in one project

@ivanpaulovich
Copy link
Owner Author

The first "more complex" example of FluentMediator is available here https://github.com/ivanpaulovich/clean-architecture-manga

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants