本文整理汇总了C#中IReadBuffer.ReadByte方法的典型用法代码示例。如果您正苦于以下问题:C# IReadBuffer.ReadByte方法的具体用法?C# IReadBuffer.ReadByte怎么用?C# IReadBuffer.ReadByte使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReadBuffer
的用法示例。
在下文中一共展示了IReadBuffer.ReadByte方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Read
public override string Read(IReadBuffer buffer, int length)
{
char[] chars = new char[length];
for (int ii = 0; ii < length; ii++)
{
chars[ii] = (char)((buffer.ReadByte() & unchecked((int)(0xff))) | ((buffer.ReadByte
() & unchecked((int)(0xff))) << 8));
}
return new string(chars, 0, length);
}
示例2: ReadTypeInfo
public virtual void ReadTypeInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
info, int classID)
{
BitMap4 typeInfoBitmap = new BitMap4(buffer.ReadByte());
info.Primitive(typeInfoBitmap.IsTrue(0));
info.Nullable(typeInfoBitmap.IsTrue(1));
}
示例3: Read
public virtual string Read(IReadBuffer buffer, int length)
{
var chars = new char[length];
for (var ii = 0; ii < length; ii++)
{
chars[ii] = (char) (buffer.ReadByte() & unchecked(0xff));
}
return new string(chars, 0, length);
}
示例4: ReadLong
public static long ReadLong(IReadBuffer buffer)
{
long ret = 0;
if (Deploy.debug && Deploy.debugLong)
{
ret = long.Parse(new LatinStringIO().Read(buffer, Const4.LongBytes).Trim());
}
else
{
for (int i = 0; i < Const4.LongBytes; i++)
{
ret = (ret << 8) + (buffer.ReadByte() & unchecked((int)(0xff)));
}
}
return ret;
}
示例5: ReadEnd
public static void ReadEnd(IReadBuffer buffer)
{
if (Deploy.debug && Deploy.brackets)
{
if (buffer.ReadByte() != Const4.Yapend)
{
throw new Exception("Debug.readEnd() YAPEND expected");
}
}
}