/// <summary> /// Internal method to call Logout /// </summary> /// <returns> /// The <see cref="Task"/>, which completes when the server returns the result of the method /// </returns> internal async Task CallLogoutMethod() { await this.Call("logout"); this.UserSession = null; }
/// <summary> /// Internal method for calling login methods. This will call the given server method, /// then set the UserSession /// </summary> /// <param name="methodName"> /// The login method name. /// </param> /// <param name="parameters"> /// The parameters to invoke the method with. /// </param> /// <returns> /// The <see cref="Task"/>, which completes when the server returns the result of the method. /// </returns> internal async Task CallLoginMethod(string methodName, params object[] parameters) { var loginResult = await this.Call<UserSession>(methodName, parameters); this.UserSession = loginResult; }