andrebaltieri / Flunt

Validations and Notifications
https://github.com/andrebaltieri/flunt
MIT License
624 stars 162 forks source link

Change property names #60

Closed andrebaltieri closed 3 years ago

andrebaltieri commented 3 years ago

Some names on Notifiable.cs are no intuitive, we`re gonna change to:

// From
bool Invalid 
bool Valid
// To
bool IsNotValid 
bool IsValid
natancmacedo commented 3 years ago

I totally agree As you are breaking some contract (since some projects use Valid or Invalid) you will create a major version?

LucasWBritz commented 3 years ago

I totally agree As you are breaking some contract (since some projects use Valid or Invalid) you will create a major version?

Another option is to keep both and add an [Obsolete] attribute on the properties. Then he can delete them in a future version. So it won't break anything and will raise some alerts pointing out to use the new properties.

andrebaltieri commented 3 years ago

@natancmacedo yeah, will be a major release!!! @LucasWBritz great, but as well have a major release, I think its not necessary!

andrebaltieri commented 3 years ago

Base Notification class now have only IsValid property. You can check here: https://github.com/andrebaltieri/Flunt/blob/dev/Flunt/Notifications/Notifiable.cs

And here is a sample of how can you create your custom notifications: https://github.com/andrebaltieri/Flunt/blob/dev/Flunt.Tests/CustomNotificationsTests.cs