private async Task Init() { try { InitLoad(); var assembly = Assembly.GetExecutingAssembly(); lblVersion.Text = assembly.GetName().Version.ToString(3); var sett = Settings.Default; UriProvider.IsProveedor = sett.EsProveedor; if (string.IsNullOrWhiteSpace(sett.Ruc) || string.IsNullOrWhiteSpace(sett.Usuario) || string.IsNullOrWhiteSpace(sett.Clave)) { InvokeOnClick(btnSetting, null); return; } _auth = new SunatApi(sett.Ruc, sett.Usuario, sett.Clave); _auth.Login(); await Extractor() .ConfigureAwait(false); } catch (Exception e) { Error(e.Message); } Invoke(new MethodInvoker(() => spinner.Visible = false)); }
public SunatApiTests() { _auth = new SunatApi("20551520634", "", ""); }