Work with result action

Mar 1, 2013 at 9:02 AM
Hi,

Please can you give us a example of a ValidationResult Task implementation.

Code for v1.0 DLL
Validator.ValidateAllAsync(Sub(in_vrResultado As ValidationResult)
                                           If in_vrResultado.IsValid Then
                                               GuardarRegisto()
                                           End If
                                       End Sub)
How we can convert it to v1.1 DLL?

Regards,
Deptc
Coordinator
Mar 1, 2013 at 10:04 AM
Hi,

Yes, sure. Something like this:
Dim uiThread = TaskScheduler.FromCurrentSynchronizationContext()

Validator.ValidateAllAsync().ContinueWith(Function(t) 
Dim in_vrResultado As ValidationResult = t.Result

If in_vrResultado.IsValid Then
    GuardarRegisto()

End If

End Function, uiThread)
You can also download the source code of examples.
Mar 1, 2013 at 10:58 AM
Hi,

Thank's, this work fine for us.

Regards,
Deptc