コード例 #1
0
        /// <returns>GameServer list</returns>
        public IEnumerable <Model.GameServer> Login(string login, string password)        // Todo: SocketException
        {
            lock (Sync)
            {
                LoginServer.Connect(Config, Identity = new Model.Account()
                {
                    Login    = login,
                    Password = password
                });

                var result = Wait(r => r is Result.LoginConnected || r is Result.LoginFail);
                if (result is Result.LoginConnected)
                {
                    return(((Result.LoginConnected)result).GameServers);
                }
                else
                {
                    throw new LoginFailException((Result.LoginFail)result);
                }
            }
        }