public Async<Profile> GetProfile(string userName)
{
Async<Profile> asyncProfile = new Async<Profile>();
_twitterService.GetProfile(userName, delegate(Profile profile) {
if (profile == null) {
asyncProfile.Complete(new Exception("The profile for '" + userName + "' could not be loaded."));
}
else {
asyncProfile.Complete(profile);
}
});
return asyncProfile;
}