using System;

using System.Linq;
using System.Web;

using g = com.xykj.games;
using m = com.xykj.model;
using web.Code;



namespace web.stion
{
    internal class Test
    {
        #region 执行
        internal void EngTest(HttpApplication content)
        {
            var test_type = content.Request.Params["cmd"];
            var xykj = new XYKJ();
            var comp = "";
            switch (test_type)
            {
                case "game":
                    comp = xykj.OnPlay(Config.user, Config.game, Config.server, Config.port);
                    break;
                case "pay":
                    comp = xykj.OnPay(Config.user, Config.game, Config.server, Config.port, Config.order);
                    break;
                case "user":
                    comp = xykj.User(Config.user, Config.game, Config.server, Config.port);
                    break;
                case "card":
                    comp = xykj.Card(Config.user, Config.game, Config.server, Config.port);
                    break;
                default:
                    comp = "error : 未定义cmd命令!";
                    break;
            }
            ConfigKey.Insert("ret", comp);

            ConfigKey.Insert("md5", XY.GAME_PAY_MD5);
            ConfigKey.Insert("sign", XY.GAME_PAY_SIGN);
            ConfigKey.Insert("action", XY.GAME_PAY_ACTION);

        }
        #endregion
    }



    /*** 开始 ********************************************/

    public class XYKJ : com.xykj.common.CodeInterface
    {
        public string OnPlay(com.xykj.model.xy_users user, com.xykj.model.xy_games game, com.xykj.model.xy_servers server, com.xykj.model.xy_ports port)
        {
            return "";
        }

        public string OnPay(com.xykj.model.xy_users user, com.xykj.model.xy_games game, com.xykj.model.xy_servers server, com.xykj.model.xy_ports port, com.xykj.model.xy_order order)
        {
            return "0.0";
        }

        public string User(com.xykj.model.xy_users user, com.xykj.model.xy_games game, com.xykj.model.xy_servers server, com.xykj.model.xy_ports port)
        {
            return "-255";
        }


        public string Card(com.xykj.model.xy_users user, com.xykj.model.xy_games game, com.xykj.model.xy_servers server, com.xykj.model.xy_ports port)
        {
            return "-255";
        }
    }
    /***  结束 ********************************************/
}