lurumad / core-flash

Minimalist flash message system for ASP.NET MVC Core.
Apache License 2.0
24 stars 8 forks source link

Added strongly-typed shortcuts for all types #6

Closed anisalibegic closed 5 years ago

anisalibegic commented 5 years ago

Added strongly-typed shortcuts for all types: FlashPrimary(), FlashSecondary(), FlashSuccess(), FlashDanger(), FlashWarning(), FlashInfo(), FlashLight(), FlashDark().

lurumad commented 5 years ago

Hi @grandpa-guru

Thanks for your contibution.

I don't like too much the idea of being polute the IFlasher interface with many methods. I would prefer to create an extensions methods for different message types, so in this way our IFlasher interface is much cleaner and don't force to implement many methods.

Does make sense?

Kind regards!

anisalibegic commented 5 years ago

Are those extension methods going to be the part of this plugin or every user needs to create those extensions for himselft?

lurumad commented 5 years ago

Those extensions methods could be add to the project and every user could be reuse but we don't polute the interface.

Regards!

anisalibegic commented 5 years ago

I understand that you don't want to polute the interface but please make those extensions part of the plugin.

lurumad commented 5 years ago

Would you like to add those extensions methods and modify this PR or do you prefer I close this PR and add this change?

Regards!

anisalibegic commented 5 years ago

Sure, will do.

anisalibegic commented 5 years ago

I add those extension methods and modified my PR. I also changed the namespace of IFlasher.cs from namespace Core.Flash.Abstractions to namespace Core.Flash so there is no need to import Core.Flash and Core.Flash.Abstractions every time you use the Flasher, only Core.Flash.

lurumad commented 5 years ago

@grandpa-guru

Can you change the version of Core.Flash in your PR in dependencies.props to 2.1.0?

Regards!

anisalibegic commented 5 years ago

Done. Updated version to 2.1.0.

lurumad commented 5 years ago

Thank you for your collaboration!