These are chat archives for bchavez/Bogus

23rd
Mar 2016
Miguel Moura
@mdmoura
Mar 23 2016 20:37
Hi Brian
Brian Chavez
@bchavez
Mar 23 2016 20:37
hello
how are you?
Miguel Moura
@mdmoura
Mar 23 2016 20:37
Fine and you?
I just read your answers
Brian Chavez
@bchavez
Mar 23 2016 20:38
good thx :)
cool. everything is okay?
Miguel Moura
@mdmoura
Mar 23 2016 20:38
Sure. About the Guid I knew what was happening ... But might be confusing for someone using it. Might be helpful a note on the wiki
For me RuleFor(x => x.Key, Guid.NewGuid()) means only that I would not need any of the Faker extensions to generate the value and not that the value is constant. Does it make sense?
Brian Chavez
@bchavez
Mar 23 2016 20:40
yea, when i added the feature request, i kinda felt it could be confusing int he API. ... which is why i made the parameter name constantValue.
Miguel Moura
@mdmoura
Mar 23 2016 20:41
Because when I asked for that I wasn't thinking it would be a constant. I though it would be a value with no need for the Faker helpers to be generate. :-)
Brian Chavez
@bchavez
Mar 23 2016 20:41
the only way to do that, then would be to specify a lambda function
Miguel Moura
@mdmoura
Mar 23 2016 20:41
Sure.
Brian Chavez
@bchavez
Mar 23 2016 20:41
maybe, RuleFor(x => x.Name, () => Guid.NewGuid())?
Miguel Moura
@mdmoura
Mar 23 2016 20:41
Yep ... That makes more sense
Brian Chavez
@bchavez
Mar 23 2016 20:42
okay, let me see
Miguel Moura
@mdmoura
Mar 23 2016 20:43
Sure. No worries
BTW when I have the time I will create a version of the data for PT Portugal. You have for Brazil but not for Portugal
Brian Chavez
@bchavez
Mar 23 2016 20:46
you think we should keep the constantValue .RuleFor?
oh great. that would be cool having a PT locale.
Miguel Moura
@mdmoura
Mar 23 2016 21:03
I think you should remove the constantValue. It is quite confusing
Brian Chavez
@bchavez
Mar 23 2016 21:07
okay cool. yeah, i agree
so, now should be able to do this: .RuleFor(u => u.SomeGuid, Guid.NewGuid)
with 0-arity Func<out Result>
... just sent v5.1.1-beta-3 for build. should be avilable soon
Miguel Moura
@mdmoura
Mar 23 2016 21:10
Great. When it is available I will test it and give feedback. Probably only tomorrow
Brian Chavez
@bchavez
Mar 23 2016 21:11
oh nice, okay great, thanks again for your feedback and help
Miguel Moura
@mdmoura
Mar 23 2016 21:13
I will check it out. Need to go but I will send feedback tomorrow for sure. See you later. Cheers.
Brian Chavez
@bchavez
Mar 23 2016 21:13
cheers m8