本文整理汇总了C#中ActionGetter.GetSt方法的典型用法代码示例。如果您正苦于以下问题:C# ActionGetter.GetSt方法的具体用法?C# ActionGetter.GetSt怎么用?C# ActionGetter.GetSt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionGetter
的用法示例。
在下文中一共展示了ActionGetter.GetSt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
示例2: ResponseError
/// <summary>
///
/// </summary>
/// <param name="response"></param>
/// <param name="actionGetter"></param>
/// <param name="errorCode"></param>
/// <param name="errorInfo"></param>
public virtual void ResponseError(BaseGameResponse response, ActionGetter actionGetter, int errorCode, string errorInfo)
{
string st = actionGetter.GetSt();
MessageHead head = new MessageHead(actionGetter.GetMsgId(), actionGetter.GetActionId(), st, errorCode, errorInfo);
MessageStructure sb = new MessageStructure();
sb.WriteBuffer(head);
response.BinaryWrite(sb.PopBuffer());
}
示例3: ResponseError
/// <summary>
///
/// </summary>
/// <param name="response"></param>
/// <param name="actionGetter"></param>
/// <param name="errorCode"></param>
/// <param name="errorInfo"></param>
public virtual void ResponseError(BaseGameResponse response, ActionGetter actionGetter, int errorCode, string errorInfo)
{
string st = actionGetter.GetSt();
ProtocolVersion prtcl = actionGetter.GetPtcl();
MessageHead head = new MessageHead(actionGetter.GetMsgId(), actionGetter.GetActionId(), st, errorCode, errorInfo);
MessageStructure sb = new MessageStructure();
if (prtcl >= ProtocolVersion.ExtendHead)
{
sb.PushIntoStack(0); //不输出扩展头属性
}
sb.WriteBuffer(head);
response.BinaryWrite(sb.PopBuffer());
}