示例#1
0
        /// <summary>
        /// Login with a given username and password.
        /// Currently, this is the only login method the SDK supports.
        /// </summary>
        /// <param name="username">Username</param>
        /// <param name="password">Password</param>
        public MatrixLoginResponse LoginWithPassword(string username, string password)
        {
            var result = api.ClientLogin(new MatrixLoginPassword(username, password));

            api.SetLogin(result);
            return(result);
        }
示例#2
0
 /// <summary>
 /// Login with a given username and password.
 /// This method will also start a sync with the server
 /// Currently, this is the only login method the SDK supports.
 /// </summary>
 /// <param name="username">Username</param>
 /// <param name="password">Password</param>
 public void LoginWithPassword(string username, string password)
 {
     api.ClientLogin(new MatrixLoginPassword(username, password));
     api.ClientSync();
     api.StartSyncThreads();
 }