public async Task<bool> LoginAsync(com.riotgames.platform.login.AuthenticationCredentials cred) { try { com.riotgames.platform.login.Session session = await mainClient.InvokeAsync<com.riotgames.platform.login.Session>("my-rtmps","loginService","login", cred); CurrentSession = session; await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "bc", "bc-" + session.accountSummary.accountId); await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "gn-" + session.accountSummary.accountId, "gn-" + session.accountSummary.accountId); await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "cn-" + session.accountSummary.accountId, "cn-" + session.accountSummary.accountId); return await mainClient.LoginAsync(session.accountSummary.username, session.token); } catch (Exception e) { //TODO: handle exceptions properly System.Windows.MessageBox.Show("login:" + e.ToString()); } return false; }
public async Task <bool> LoginAsync(com.riotgames.platform.login.AuthenticationCredentials cred) { try { com.riotgames.platform.login.Session session = await mainClient.InvokeAsync <com.riotgames.platform.login.Session>("my-rtmps", "loginService", "login", cred); CurrentSession = session; await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "bc", "bc-" + session.accountSummary.accountId); await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "gn-" + session.accountSummary.accountId, "gn-" + session.accountSummary.accountId); await mainClient.SubscribeAsync("my-rtmps", "messagingDestination", "cn-" + session.accountSummary.accountId, "cn-" + session.accountSummary.accountId); return(await mainClient.LoginAsync(session.accountSummary.username, session.token)); } catch (Exception e) { //TODO: handle exceptions properly System.Windows.MessageBox.Show("login:" + e.ToString()); } return(false); }