don't do that, use Validate or ValidatePropertyValue.. They return InvalidValue class and you can do anything there.
Avoid exceptions. 2010/10/21 [email protected] <[email protected]> > You can always catch the exception and return what information you are > after > try { > // validate > } > catch (InvalidStateException ex) { > return ex.GetInvalidValues().Select(x => new YourSerializableObject > { EntityType = x.EntityType }).ToArray() > } > > On Oct 21, 4:38 am, kor <[email protected]> wrote: > > hi all, i have a problem with this class > > (NHibernate.Validator.Exceptions.InvalidStateException) becouse it's > > not serializable. > > > > i saw the code and i found that the problem isthe private field > > InvalidValue[] _invalidValues that is static (and so not > > serializable), > > this seems a bit strange to me so i would ask if samebody can explain > > me why it's static > > > > thanks > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" 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/group/nhusers?hl=en.
