With this, the only metadata of the Fluent rule, would be the Message, and yes, we can create attributes on the fly (with a unique name). Why I said it should be only the message, because the parameters can setted in the handler, maybe via ctor, like
...MustBe(new MyFoo(param1).Rule()) On Wed, Feb 11, 2009 at 5:25 PM, Gustavo Ringel <[email protected]>wrote: > At the end as it is working until now it should be translated to an > attribute...how are you going to translate this into an attribute? I may be > missing something. > > For now to implement this you should create an attribute and a validator, > are you suggesting creating attributes and validators on the fly? > > Gustavo. > > On Wed, Feb 11, 2009 at 9:13 PM, Dario Quintana < > [email protected]> wrote: > >> My advice, validate against handlers as an option. >> >> public class PersonValidationDef : ValidationDef<Person> >> { >> public PersonValidationDef() >> { >> Define(x=>x.Assoc).MustBe(MyMethodThatReturnABoolean); >> } >> } >> >> The API seems to fine, but +1 for the Gustavo requeriment about the names. >> Note: That was a change from NUnit to XUnit, they removed all: "Are" "Is" >> at the beggining of the methods, is a silliness but helps. >> >> >> On Wed, Feb 11, 2009 at 5:02 PM, Fabio Maulo <[email protected]>wrote: >> >>> Do you have some advise about the API ? >>> Check the first post from start to end, please. >>> -- >>> Fabio Maulo >>> >>> >>> >> >> >> -- >> Dario Quintana >> http://darioquintana.com.ar >> >> >> > > > > -- Dario Quintana http://darioquintana.com.ar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "NHibernate Contrib - Development Group" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com.ar/group/nhcdevs?hl=en -~----------~----~----~----~------~----~------~--~---
