public async Task <Dictionary <string, string> > GetAppsIdentifiersAsync() { Dictionary <string, string> appsList = new Dictionary <string, string>(); QSConnections qsConn = new QSConnections(); var location = await qsConn.GetLocation(); var apps = await location.GetAppIdentifiersAsync(); foreach (var app in apps) { try { if (!appsList.ContainsValue(app.AppName)) //doesn't add if its already there { appsList.Add(app.AppId, app.AppName); } } catch (MethodInvocationException e) { DropDown.errMessage = e.Message; throw e; } catch (TimeoutException e) { DropDown.errMessage = e.Message; throw e; } catch (SocketException e) { DropDown.errMessage = e.Message; throw e; } catch (WebSocketException e) { DropDown.errMessage = e.Message; throw e; } catch (HttpRequestException e) { DropDown.errMessage = e.Message; throw e; } } return(appsList); }
public async Task <IEnumerable <ISheet> > GetSheetsAsync(string appId) { string id = appId; QSConnections qsConn = new QSConnections(); var location = await qsConn.GetLocation(); IAppIdentifier appIdentifier = location.AppWithId(appId); try { IApp app = location.App(appIdentifier, session: Session.Random); var sheets = app.GetSheets(); return(sheets); } catch (NullReferenceException e) { throw e; } catch (Exception e) { throw e; } }