本文整理汇总了C#中ByteArray.ReadShort方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArray.ReadShort方法的具体用法?C# ByteArray.ReadShort怎么用?C# ByteArray.ReadShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ByteArray
的用法示例。
在下文中一共展示了ByteArray.ReadShort方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReadStringList
private List<string> ReadStringList(ByteArray ba)
{
List<string> tbl = HeapObjectPoolTool<List<string>>.GetHeapObject();
int len1 = ba.ReadShort();
ba.ReadInt();
for (int i = 0; i < len1; i++)
{
tbl.Add(ReadString(ba));
}
return tbl;
}
示例2: ReadString
private string ReadString(ByteArray ba)
{
uint len = (uint)ba.ReadShort();
return ba.ReadUTFBytes(len);
}
示例3: ReadDictionaryList
private List<Dictionary<string, object>> ReadDictionaryList(string str, ByteArray ba)
{
List<Dictionary<string, object>> stbl = HeapObjectPoolTool<List<Dictionary<string, object>>>.GetHeapObject();
int len1 = ba.ReadShort();
ba.ReadInt();
for (int i = 0; i < len1; i++)
{
stbl.Add(ReadDictionary(str, ba));
}
return stbl;
}
示例4: ReadIntList
private List<int> ReadIntList(ByteArray ba)
{
List<int> tbl = HeapObjectPoolTool<List<int>>.GetHeapObject();
int len1 = ba.ReadShort();
ba.ReadInt();
for (int i = 0; i < len1; i++)
{
int tem_o_read_int = ReadInt(ba);
tbl.Add(tem_o_read_int);
}
return tbl;
}
示例5: Analysis
NetWorkMessage Analysis(ByteArray bytes)
{
NetWorkMessage msg = GetMessageByPool();
bytes.ReadShort(); //消息长度
bytes.ReadByte(); //模块名
int methodIndex = bytes.ReadShort(); //方法名
msg.m_MessageType = m_methodNameInfo[methodIndex];
int re_len = bytes.Length - 5;
msg.m_data = AnalysisData(msg.m_MessageType, bytes.ReadBytes(re_len));
return msg;
}