当前位置: 首页>>代码示例>>C#>>正文


C# HttpGet.GetString方法代码示例

本文整理汇总了C#中HttpGet.GetString方法的典型用法代码示例。如果您正苦于以下问题:C# HttpGet.GetString方法的具体用法?C# HttpGet.GetString怎么用?C# HttpGet.GetString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HttpGet的用法示例。


在下文中一共展示了HttpGet.GetString方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnRequested

        protected override void OnRequested(HttpGet httpGet, IGameResponse response)
        {
            try
            {
                var actionId = httpGet.GetString("ActionID").ToInt();
                var uid = httpGet.GetString("uid");
                Console.WriteLine("Action{0} from {1} {2}", actionId, httpGet.RemoteAddress, uid);
                ActionFactory.Request(httpGet, response, userId => new GameDataCacheSet<GameUser>().FindKey(userId.ToNotNullString()));

            }
            catch (Exception ex)
            {
                TraceLog.WriteError("{0}", ex);
            }
        }
开发者ID:rayphoenix333,项目名称:Scut,代码行数:15,代码来源:GameHostApp.cs

示例2: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;//new HttpResponse(sw);
            response.Charset = "unicode";// "unicode";
            HttpGet httpGet = new HttpGet();
            String ActionID = string.Empty;
            if (httpGet.GetString("ActionID", ref ActionID))
            {
                try
                {
                    string actionName = string.Concat("Action", ActionID);
                    string sname = string.Concat("ZyGames.DirCenter.Action." + actionName);
                    object[] args = new object[1];
                    args[0] = response;

                    BaseStruct obj = (BaseStruct) Activator.CreateInstance(Type.GetType(sname), new object[] { httpGet });
                    if (obj.ReadUrlElement() && obj.DoAction() && !obj.GetError())
                    {
                        obj.BuildPacket();
                        obj.WriteAction();
                    }
                    else
                    {
                        obj.WriteErrorAction();
                        return;
                    }
                }
                catch (Exception ex)
                {
                    BaseLog oBaseLog = new BaseLog("DirCenterErrMain");
                    oBaseLog.SaveLog(ex);
                }
            }
        }
开发者ID:rongxiong,项目名称:Scut,代码行数:34,代码来源:Service.aspx.cs

示例3: LoginProxy

 public LoginProxy(HttpGet httpGet)
 {
     this._httpGet = httpGet;
     if (_httpGet != null)
     {
         _httpGet.GetString("RetailID", ref retailID);
     }
 }
开发者ID:rongxiong,项目名称:Scut,代码行数:8,代码来源:LoginProxy.cs

示例4: OnRequested

        protected override void OnRequested(HttpGet httpGet, IGameResponse response)
        {
            try
            {
                var actionId = httpGet.ActionId;
                var uid = httpGet.GetString("uid");
                Console.WriteLine("Action{0} from {1} {2}", actionId, httpGet.RemoteAddress, uid);
                ActionFactory.Request(httpGet, response, GetUser);

            }
            catch (Exception ex)
            {
                TraceLog.WriteError("{0}", ex);
            }
        }
开发者ID:87170360,项目名称:Maximus,代码行数:15,代码来源:GameHostApp.cs


注:本文中的HttpGet.GetString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。