Newbie question, I have a simple Silverlight 4 client. I'm creating some methods on the server side to handle new user creation / validation. Before I create the user, I'd like to validate a number of things. Does the user name already exist? Is the email address valid? Does the password pass strictness checking? Etc, etc.
I'm not really finding a clear way of handling this and I'm looking for some suggestions. I have multiple calls that I need to make to the server for each condition I want to check for. All calls are asynchronous. The way I see it I can do the following:
- Call each validation function on the server and do mock synchronous calls using waits. ew.
- Try and stitch all of the various callback functions completed events. Ew.
- Combine all of the validation calls into one on the server side. Seems clean now, but what happens when I want to perform different validations or different combinations of validations? That means more new functions. Seems like it could become a maintenance headache down the road.
Is there an elegant solution that is evading me?
Thank you.