本文整理汇总了C#中ZyGames.Framework.Game.Service.BaseGameResponse.WriteError方法的典型用法代码示例。如果您正苦于以下问题:C# BaseGameResponse.WriteError方法的具体用法?C# BaseGameResponse.WriteError怎么用?C# BaseGameResponse.WriteError使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ZyGames.Framework.Game.Service.BaseGameResponse
的用法示例。
在下文中一共展示了BaseGameResponse.WriteError方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: WriteErrorAction
/// <summary>
/// 输出一个错误的Action 与 相应错误内容描述
/// </summary>
public void WriteErrorAction(BaseGameResponse response)
{
logActionResult += errorCode + "-";
if (string.IsNullOrEmpty(errorInfo))
{
logActionResult += DefaultErrorInfo + "-";
}
else
{
logActionResult += errorInfo + "-";
}
this.iVisitEndTime = DateTime.Now;
WatchAction();
this.SaveActionLogToDB(LogActionStat.Fail, logActionResult);
if (!IsNotRespond)
{
response.WriteError(actionGetter, errorCode, errorInfo);
}
//dataStruct.WriteAction(response, actionId, errorCode, errorInfo, MsgId, St);
}