當前位置: 首頁>>代碼示例>>C#>>正文


C# ActionGetter類代碼示例

本文整理匯總了C#中ActionGetter的典型用法代碼示例。如果您正苦於以下問題:C# ActionGetter類的具體用法?C# ActionGetter怎麽用?C# ActionGetter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ActionGetter類屬於命名空間,在下文中一共展示了ActionGetter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的ActionGetter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。