-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
Coerce output in RuleContext.AddOutValue #3925
Coerce output in RuleContext.AddOutValue #3925
Conversation
Thank you for your contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As marker to wait for response from @rockfordlhotka
@StefanOssendorf I've got the same conversion from null to String.Empty when trying to write null value directly to a string property because of csla/Source/Csla/Core/BusinessBase.cs Lines 2451 to 2452 in a60f4da
|
That may be the case. But currently a rule can set a string to |
The reason that, in general, CSLA tries to ensure that a string property is empty instead of null, is that (iirc) Windows Forms data binding can't handle null in some cases. If someone is using Windows Forms and they created a rule that set a string to null, that would probably cause data binding to fail in their app. I don't think anyone else would notice, because I don't think any other UI frameworks have this limitation. All that said, this is a breaking change - but one that has no real meaning, since CSLA string properties generally convert null into empty already. Someday maybe we'll change everything to support null string property values, but that day is not today. I think this change is fine. |
@StefanOssendorf Can we merge then? |
Alrighty. LGTM then :-) |
Close #3251