How can I improve this code, without to return async Task?
[WebMethod]
public string Login(string login, string password, string deviceId, string appVersion, string xuid)
{
var authTask = _SSOFrontendService.GetSSOTokenAsync(login, password, deviceId, appVersion);
var tokenTimestampTask = _SSOFrontendService.GetSSOTokenTimestampAsync();
Task.WhenAll(authTask, tokenTimestampTask);
var authResult = authTask.Result;
if (authResult.Status == ResultStatus.OK)
{
var token = new MappedToken(xuid, login, password, deviceId, appVersion, authResult.Content, tokenTimestampTask.Result.Content);
var mapTokenTask = _mapTokenService.MapAsync(token);
Task.WhenAll(_mapTokenService.MapAsync(token));
return _serializer.Serizalize(mapTokenTask.Result);
}
return _serializer.Serizalize(authResult);
}