예제 #1
0
        /// <summary>
        /// Gets Boss table from Data server
        /// </summary>
        internal List <Boss> GetBossTable()
        {
            List <Boss> bosses = null;

            try
            {
                Console.Write("> Getting Boss table from DataServer... ");
                bosses = new List <Boss>(DSConnection.GetBossTable());
                Console.WriteLine("OK!");
            } catch (DataServerException ex) {
                Console.WriteLine("ERROR!");
                throw ex;
            }

            return(bosses);
        }
예제 #2
0
        public Boss[] GetBossTable(string token, out ECode ec)
        {
            ec = ECode.None;
            Boss[] bosses = null;

            if (UserRegistry.IsTokenRegistered(token))
            {
                try
                {
                    bosses = DSConnection.GetBossTable();
                } catch (ServerConnectionException) {
                    ec = ECode.ConnectionError;
                } catch (DataServerException) {
                    ec = ECode.QueryError;
                }
            }
            else
            {
                ec = ECode.AuthenticationFail;
            }

            return(bosses);
        }