« first day (3669 days earlier)      last day (1281 days later) » 

8:57 AM
@mr5 what does it do?
 
 
2 hours later…
mr5
11:11 AM
@CaptainObvious C# property validator. It subscribes to an instance of INPC and call the validators from the PropertyChanged event.
 
 
3 hours later…
mr5
2:34 PM
Updated to 1.0.6 with autofill feature!
setup is as easy as:
validationService.For(this, autofill: true)
    .AddRule(e => e.FirstName, new RequiredRule())
    .AddRule(e => e.LastName, new LengthRule(50))
    .AddRule(e => e.EmailAddress, new RequiredRule(), new LengthRule(100), new EmailFormatRule())
    .AddRule(e => e.PhysicalAddress, "Deez nuts", new AddressRule());
and the error properties will be updated accordingly.
 
3:01 PM
Nice
 
 
1 hour later…
4:03 PM
Hi all, I have a condition like this:

if(type==1)
return value==null ? Visibility.Collapse : Visibility.Hidden;
else
return value==null ? Visibility.Hidden : Visibility.Collapse;

Can the code be reduced? I'm thinking in some bitwise operator that can help, (but can't find):
return value == null (?) (type==1) ? Visibility.Collapsed : Visibility.Visible;

(?) is some operator that return true if

true (?) true> true
false (?) true> false


true (?) false> false
false (?) false> true
It's getting easier now after writing a clean question here:
I'm looking for an operator that returns true only If both the same bit, otherwise, false.
I'm sure there's that operator
 
4:21 PM
not xor?
== :p
 
 
1 hour later…
5:30 PM
Wow, what easy 😅
 

« first day (3669 days earlier)      last day (1281 days later) »