public async Task<string> makeOperationAsync(SupportedModules module, SupportedMethods method, Cours reqCours = null, string resStr = "", bool forAuth = false) { if (IsNetworkAvailable() && (forAuth || await isValidAccountAsync(forAuth))) { PostDataWriter args = new PostDataWriter() { module = module, method = method, cidReq = reqCours, resStr = resStr }; String strContent = ""; try { strContent = await getResponseAsync(args); #if DEBUG Debug.WriteLine("Call for :" + module + "/" + method + "\nResponse :" + strContent + "\n"); #endif } catch (Exception ex) { lastException = ex; } return strContent; } else { lastException = new NetworkException("Network Unavailable"); return null; } }
public async Task<string> MakeOperationAsync(SupportedModules module, SupportedMethods method, string syscode = "", string resStr = "", string genMod = "", bool forAuth = false) { if (IsNetworkAvailable() && (forAuth || await IsValidAccountAsync(forAuth))) { PostDataWriter args = new PostDataWriter() { module = module, method = method, cidReq = syscode, resStr = resStr, GenMod = genMod }; String strContent = ""; try { strContent = await GetResponseAsync(args); #if DEBUG Debug.WriteLine("Call for :" + module + "/" + method + "\nResponse :" + strContent + "\n"); #endif if (args.method != SupportedMethods.GetPage && strContent.StartsWith("<")) { strContent = ""; } } catch (Exception ex) { LastException = ex; } return strContent; } else { LastException = new NetworkException("Network Unavailable"); return null; } }