• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ActionGetter类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ActionGetter的典型用法代码示例。如果您正苦于以下问题:C# ActionGetter类的具体用法?C# ActionGetter怎么用?C# ActionGetter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ActionGetter类属于命名空间,在下文中一共展示了ActionGetter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: ScriptAction

 /// <summary>
 /// /
 /// </summary>
 /// <param name="scriptType"></param>
 /// <param name="aActionId"></param>
 /// <param name="actionGetter"></param>
 /// <param name="scriptScope"></param>
 /// <param name="ignoreAuthorize">忽略授权</param>
 public ScriptAction(ScriptType scriptType, int aActionId, ActionGetter actionGetter, object scriptScope, bool ignoreAuthorize)
     : base(aActionId, actionGetter)
 {
     _scriptType = scriptType;
     _scriptScope = scriptScope;
     _ignoreAuthorize = ignoreAuthorize;
 }
开发者ID:houguohua,项目名称:Scut,代码行数:15,代码来源:ScriptAction.cs


示例2: ResponseError

 public virtual void ResponseError(BaseGameResponse response, ActionGetter actionGetter, int errorCode, string errorInfo)
 {
     MessageHead head = new MessageHead(actionGetter.GetMsgId(), actionGetter.GetActionId(), errorCode, errorInfo);
     MessageStructure sb = new MessageStructure();
     sb.WriteBuffer(head);
     response.BinaryWrite(sb.PopBuffer());
 }
开发者ID:juneman,项目名称:Scut,代码行数:7,代码来源:ActionDispatcher.cs


示例3: Action1000

 public Action1000(ActionGetter actionGetter)
     : base(1000, actionGetter)
 {
     responsePack = new ResponsePack();
     _watch = new Stopwatch();
     _versionsNotSupport = new List<string>();
 }
开发者ID:guccang,项目名称:scutlogic,代码行数:7,代码来源:Action1000.cs


示例4: LoginProxy

		/// <summary>
		/// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Sns.LoginProxy"/> class.
		/// </summary>
		/// <param name="httpGet">Http get.</param>
        public LoginProxy(ActionGetter httpGet)
        {
            this._httpGet = httpGet;
            if (_httpGet != null)
            {
                _httpGet.GetString("RetailID", ref retailID);
            }
        }
开发者ID:houguohua,项目名称:Scut,代码行数:12,代码来源:LoginProxy.cs


示例5: Action2500

 public Action2500(ActionGetter actionGetter)
     : base(2500, actionGetter)
 {
     urlParams = "";
     _appKey = GameConfigMgr.Instance().getString("360AppKey", "");
     appSecret = GameConfigMgr.Instance().getString("360AppSecret", "");
     urlVerfily = GameConfigMgr.Instance().getString("360UrlVerfily", "");
 }
开发者ID:guccang,项目名称:scutlogic,代码行数:8,代码来源:Action2500.cs


示例6: BaseAction

 protected BaseAction(int aActionId, ActionGetter actionGetter)
     : base(aActionId, actionGetter)
 {
     _resultData = new ResultData()
     {
         MsgId = actionGetter.GetMsgId(),
         ActionId = actionGetter.GetActionId(),
         ErrorInfo = ""
     };
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:10,代码来源:BaseAction.cs


示例7: DoAction

 /// <summary>
 /// 
 /// </summary>
 /// <param name="actionGetter"></param>
 /// <param name="response"></param>
 protected void DoAction(ActionGetter actionGetter, BaseGameResponse response)
 {
     if (GameEnvironment.IsRunning)
     {
         OnRequested(actionGetter, response);
         ActionFactory.Request(actionGetter, response);
     }
     else
     {
         response.WriteError(actionGetter, Language.Instance.ErrorCode, Language.Instance.ServerMaintain);
     }
 }
开发者ID:houguohua,项目名称:Scut,代码行数:17,代码来源:GameBaseHost.cs


示例8: ResponseError

 public override void ResponseError(BaseGameResponse response, ActionGetter actionGetter, int errorCode, string errorInfo)
 {
     var result = new ResultData()
     {
         MsgId = actionGetter.GetMsgId(),
         ActionId = actionGetter.GetActionId(),
         ErrorCode = errorCode,
         ErrorInfo = errorInfo,
         Data = null
     };
     //实现出错处理下发
     response.BinaryWrite(Encoding.UTF8.GetBytes(MathUtils.ToJson(result)));
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:13,代码来源:WebSocketActionDispatcher.cs


示例9: ResponseError

 public void ResponseError(BaseGameResponse response, ActionGetter actionGetter, int errorCode, string errorInfo)
 {
     //实现出错处理下发
     ResponsePack head = new ResponsePack()
     {
         MsgId = actionGetter.GetMsgId(),
         ActionId = actionGetter.GetActionId(),
         ErrorCode = errorCode,
         ErrorInfo = errorInfo,
         St = actionGetter.GetSt()
     };
     byte[] headBytes = ProtoBufUtils.Serialize(head);
     byte[] buffer = BufferUtils.AppendHeadBytes(headBytes);
     response.BinaryWrite(buffer);
 }
开发者ID:guccang,项目名称:scutlogic,代码行数:15,代码来源:CustomActionDispatcher.cs


示例10: OnRequested

        protected override void OnRequested(ActionGetter actionGetter, BaseGameResponse response)
        {
            try
            {
                var actionId = actionGetter.GetActionId();
                var uid = actionGetter.GetUserId();
                Console.WriteLine("Action{0} from {1}", actionId, uid);
                ActionFactory.Request(actionGetter, response, GetUser);

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


示例11: CheckRemote

 /// <summary>
 /// Checks the remote.
 /// </summary>
 /// <returns><c>true</c>, if remote was checked, <c>false</c> otherwise.</returns>
 /// <param name="route">Route.</param>
 /// <param name="actionGetter">Http get.</param>
 protected virtual bool CheckRemote(string route, ActionGetter actionGetter)
 {
     return actionGetter.CheckSign();
 }
开发者ID:yunjoker,项目名称:Scut,代码行数:10,代码来源:GameBaseHost.cs


示例12: OnCallRemote

 /// <summary>
 /// Call remote method
 /// </summary>
 /// <param name="routePath"></param>
 /// <param name="actionGetter"></param>
 /// <param name="response"></param>
 protected virtual void OnCallRemote(string routePath, ActionGetter actionGetter, MessageStructure response)
 {
     try
     {
         string[] mapList = routePath.Split('.');
         string funcName = "";
         string routeName = routePath;
         if (mapList.Length > 1)
         {
             funcName = mapList[mapList.Length - 1];
             routeName = string.Join("/", mapList, 0, mapList.Length - 1);
         }
         string routeFile = "";
         int actionId = actionGetter.GetActionId();
         MessageHead head = new MessageHead(actionId);
         if (!ScriptEngines.SettupInfo.DisablePython)
         {
             routeFile = string.Format("Remote.{0}", routeName);
             dynamic scope = ScriptEngines.ExecutePython(routeFile);
             if (scope != null)
             {
                 var funcHandle = scope.GetVariable<RemoteHandle>(funcName);
                 if (funcHandle != null)
                 {
                     funcHandle(actionGetter, head, response);
                     response.WriteBuffer(head);
                     return;
                 }
             }
         }
         string typeName = string.Format(GameEnvironment.Setting.RemoteTypeName, routeName);
         routeFile = string.Format("Remote.{0}", routeName);
         var args = new object[] { actionGetter, response };
         var instance = (object)ScriptEngines.Execute(routeFile, typeName, args);
         if (instance is RemoteStruct)
         {
             var target = instance as RemoteStruct;
             target.DoRemote();
         }
     }
     catch (Exception ex)
     {
         TraceLog.WriteError("OnCallRemote error:{0}", ex);
     }
 }
开发者ID:yunjoker,项目名称:Scut,代码行数:51,代码来源:GameBaseHost.cs


示例13: OnRequested

 /// <summary>
 /// Raises the requested event.
 /// </summary>
 /// <param name="actionGetter">Http get.</param>
 /// <param name="response">Response.</param>
 protected virtual void OnRequested(ActionGetter actionGetter, BaseGameResponse response)
 {
 }
开发者ID:yunjoker,项目名称:Scut,代码行数:8,代码来源:GameBaseHost.cs


示例14: Action1006

 public Action1006(ActionGetter actionGetter)
     : base(1006, actionGetter)
 {
     responsePack = new Response1006Pack();
 }
开发者ID:guccang,项目名称:scutlogic,代码行数:5,代码来源:Action1006.cs


示例15: Action1002

 public Action1002(ActionGetter actionGetter)
     : base((short) ActionType.Regist, actionGetter)
 {
 }
开发者ID:rambo-long,项目名称:Scut,代码行数:4,代码来源:Action1002.cs


示例16: AuthorizeAction

 /// <summary>
 /// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Contract.Action.AuthorizeAction"/> class.
 /// </summary>
 /// <param name="actionId">Action I.</param>
 /// <param name="actionGetter">Http get.</param>
 protected AuthorizeAction(int actionId, ActionGetter actionGetter)
     : base(actionId, actionGetter)
 {
 }
开发者ID:huangchenjun,项目名称:Scut,代码行数:9,代码来源:AuthorizeAction.cs


示例17: GetLogin

 /// <summary>
 /// Gets the login.
 /// </summary>
 /// <returns>The login.</returns>
 public static ILogin GetLogin(ActionGetter httpGet, string retaiId)
 {
     return GetLogin(retaiId, httpGet);
 }
开发者ID:GamesDesignArt,项目名称:UniversalCommon,代码行数:8,代码来源:LoginProxy.cs


示例18: JsonScriptAction

 /// <summary>
 /// 
 /// </summary>
 /// <param name="scriptType"></param>
 /// <param name="aActionId"></param>
 /// <param name="actionGetter"></param>
 /// <param name="scriptScope"></param>
 /// <param name="ignoreAuthorize"></param>
 public JsonScriptAction(ScriptType scriptType, int aActionId, ActionGetter actionGetter, object scriptScope, bool ignoreAuthorize)
     : base(scriptType, aActionId, actionGetter, scriptScope, ignoreAuthorize)
 {
     EnableWebSocket = true;
 }
开发者ID:LeeWangyeol,项目名称:Scut,代码行数:13,代码来源:ScriptAction.cs


示例19: AppStorePayAction

		/// <summary>
		/// Initializes a new instance of the <see cref="ZyGames.Framework.Game.Contract.Action.AppStorePayAction"/> class.
		/// </summary>
		/// <param name="aActionId">A action identifier.</param>
		/// <param name="httpGet">Http get.</param>
        public AppStorePayAction(int aActionId, ActionGetter httpGet)
            : base(aActionId, httpGet)
        {
        }
开发者ID:luost,项目名称:Scut,代码行数:9,代码来源:AppStorePayAction.cs


示例20: OnRequested

 protected override void OnRequested(ActionGetter actionGetter, BaseGameResponse response)
 {
     Console.WriteLine("Receice actionId:{0}", actionGetter.GetActionId());
     base.OnRequested(actionGetter, response);
 }
开发者ID:daneric,项目名称:Scut-samples,代码行数:5,代码来源:MainClass.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ActionListener类代码示例发布时间:2022-05-24
下一篇:
C# ActionExecutingContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap