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


C# HttpGet.CheckSign方法代码示例

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


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

示例1: Request

 /// <summary>
 /// 请求处理
 /// </summary>
 /// <param name="typeName"></param>
 /// <param name="response"></param>
 /// <param name="userFactory"></param>
 /// <param name="httpGet"></param>
 public static void Request(string typeName, HttpGet httpGet, IGameResponse response, Func<int, BaseUser> userFactory)
 {
     string tempName = string.Format(typeName, httpGet.ActionId);
     int actionID = 0;
     string errorInfo = "";
     try
     {
         bool isRL = BaseStruct.CheckRunloader(httpGet);
         if (isRL || httpGet.CheckSign())
         {
             if (httpGet.GetInt("ActionID", ref actionID))
             {
                 BaseStruct action = FindRoute(typeName, httpGet, actionID);
                 Process(action, httpGet, response, userFactory);
                 if (action != null)
                 {
                     return;
                 }
             }
         }
         else
         {
             errorInfo = "签名验证失败";
             TraceLog.WriteError("Action request {3} error:{2},rl:{0},param:{1}", isRL, httpGet.ParamString, errorInfo, tempName);
         }
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Action request {0} error:{1}\r\nparam:{2}", tempName, ex, httpGet.ParamString);
     }
     RequestError(response, actionID, errorInfo);
 }
开发者ID:0jpq0,项目名称:Scut,代码行数:39,代码来源:ActionFactory.cs

示例2: RequestScript

 /// <summary>
 /// 请求脚本处理
 /// </summary>
 /// <param name="httpGet">请求参数对象</param>
 /// <param name="response">字节输出处理</param>
 /// <param name="userFactory">创建user对象工厂,可为Null</param>
 public static void RequestScript(HttpGet httpGet, IGameResponse response, Func<int, BaseUser> userFactory)
 {
     int actionID = httpGet.ActionId;
     string errorInfo = "";
     try
     {
         bool isRl = BaseStruct.CheckRunloader(httpGet);
         if (isRl || httpGet.CheckSign())
         {
             BaseStruct baseStruct = FindScriptRoute(httpGet, actionID);
             if (baseStruct != null)
             {
                 Process(baseStruct, httpGet, response, userFactory);
                 return;
             }
         }
         else
         {
             errorInfo = "签名验证失败";
             TraceLog.WriteError("Action request error:{2},rl:{0},param:{1}", isRl, httpGet.ParamString, errorInfo);
         }
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Action request error:{0}\r\nparam:{1}", ex, httpGet.ParamString);
     }
     RequestError(response, actionID, errorInfo);
 }
开发者ID:0jpq0,项目名称:Scut,代码行数:34,代码来源:ActionFactory.cs

示例3: RequestScript

 /// <summary>
 /// 请求脚本处理
 /// </summary>
 /// <param name="httpGet">请求参数对象</param>
 /// <param name="response">字节输出处理</param>
 /// <param name="userFactory">创建user对象工厂,可为Null</param>
 public static void RequestScript(HttpGet httpGet, IGameResponse response, Func<int, BaseUser> userFactory)
 {
     int actionID = httpGet.GetInt("actionId");
     string errorInfo = "";
     try
     {
         bool isRl = BaseStruct.CheckRunloader(httpGet);
         if (isRl || httpGet.CheckSign())
         {
             ScriptRoute scriptRoute = new ScriptRoute(actionID);
             RouteItem routeItem;
             var pythonManager = PythonScriptManager.Current;
             if (pythonManager.TryGetAction(actionID, out routeItem))
             {
                 if (scriptRoute.TryLoadAction(routeItem.ScriptPath))
                 {
                     var baseStruct = new ScriptAction((short)actionID, httpGet, scriptRoute, routeItem.IgnoreAuthorize);
                     Process(baseStruct, httpGet, response, userFactory);
                     return;
                 }
             }
         }
         else
         {
             errorInfo = "签名验证失败";
             TraceLog.WriteError("Action request error:{2},rl:{0},param:{1}", isRl, httpGet.ParamString, errorInfo);
         }
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("Action request error:{0}\r\nparam:{1}", ex, httpGet.ParamString);
     }
     RequestError(response, actionID, errorInfo);
 }
开发者ID:rayphoenix333,项目名称:Scut,代码行数:40,代码来源:ActionFactory.cs


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