private async void performAuthentication() { flurlClient = FlurlClient_Singleton.GetInstance(); //loadCustomerPath string firma = Application.Current.Properties["firma"] as string; string urlCus = String.Format("http://myqreg.dk/qreg/{0}", firma); Task <string> getStringTask = urlCus.WithClient(flurlClient).GetStringAsync(); string responseString = await getStringTask; if (responseString != null) { string server = Application.Current.Properties["SERVER"] as string; string brugernavn = Application.Current.Properties["brugernavn"] as string; string password = Application.Current.Properties["password"] as string; string url = String.Format("{0}/names.nsf?login&username={1}&password={2}", server, brugernavn, password); Task <string> getStringTask1 = url.WithClient(flurlClient).GetStringAsync(); string responseString1 = await getStringTask1; if (responseString1 != null) { FlurlClient_Singleton.setFlurlClient(flurlClient); PostToURL(); } } }
internal void disposeFlurlClient() { FlurlClient_Singleton.DisposeInstance(); _flurlClient = FlurlClient_Singleton.GetInstance(); }