Skip to content

Instantly share code, notes, and snippets.

@renestein
Created December 17, 2010 15:26
Show Gist options
  • Save renestein/745104 to your computer and use it in GitHub Desktop.
Save renestein/745104 to your computer and use it in GitHub Desktop.
ViewModelBase-Init.cs
public void Init()
{
try
{
IsInvalidModel = true;
AppTitle = GlobalConstants.APP_MAIN_TITLE;
SuppressValidating = false;
IsInvalidModel = false;
DoInternalInit();
ThreadPool.QueueUserWorkItem(_ =>
{
try
{
DoInternalAsyncInit();
}
catch (Exception e)
{
Debug.WriteLine(e);
if (!isThreadAbortException(e))
{
throw;
}
}
});
}
catch (Exception e)
{
Debug.WriteLine(e);
throw;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment