public GameforgeLauncher(AuthorizedGameforgeApi api, IEnumerable <GameforgeAccount> accounts, string email) { Accounts = accounts.ToList().AsReadOnly(); Email = email; Launcher = new NostaleLauncher(); Api = api; ActiveProcesses = new ObservableCollection <NostaleProcess>(); }
public async Task <GameforgeLauncher> Authenticate(string email, string password) { Guid installationId = InstallationId ?? Api.GenerateIntallationId(email, password); AuthorizedGameforgeApi authorizedGameforgeApi = await Api.Login(email, password, Locale, installationId); IEnumerable <GameforgeAccount> accounts = await authorizedGameforgeApi.GetAccounts(); return(new GameforgeLauncher(authorizedGameforgeApi, accounts, email)); }