public TheOldReader(string username, string password, AuthenticationCompletedHandler AuthenticationCompletedEvent) { areAuthentication = new ManualResetEvent(false); m_isAuthenticated = false; m_TokenReady = new Semaphore(0, 1); m_articleReady = new Semaphore(0, 1); m_Error = ""; Authenticate(username, password, AuthenticationCompletedEvent); }
public async void Authenticate(string username, string password, AuthenticationCompletedHandler AuthenticationCompleted) { string url = "https://theoldreader.com/reader/api/0/accounts/ClientLogin"; string post = "client=AnthuanWPReader&accountType=HOSTED&service=reader&Email=" + username + "&Passwd=" + password; m_AuthenticationInProgress = true; AnthuanUtils.Post(url, post, GetToken); areAuthentication.WaitOne(); AuthenticationCompleted(this, EventArgs.Empty); }
public TheOldReader(AuthenticationCompletedHandler AuthenticationCompletedEvent) { areAuthentication = new ManualResetEvent(false); m_isAuthenticated = false; m_Error = ""; m_TokenReady = new Semaphore(0, 1); m_articleReady = new Semaphore(0, 1); this.AuthenticationCompleted = AuthenticationCompletedEvent; Authenticate(); }