本文整理汇总了C#中IReadBuffer.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# IReadBuffer.ReadInt方法的具体用法?C# IReadBuffer.ReadInt怎么用?C# IReadBuffer.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IReadBuffer
的用法示例。
在下文中一共展示了IReadBuffer.ReadInt方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SeekSecondaryOffset
protected override void SeekSecondaryOffset(IReadBuffer buffer, ITypeHandler4 typeHandler
)
{
if (Handlers4.HandlesPrimitiveArray(typeHandler))
{
buffer.Seek(buffer.ReadInt());
}
}
示例2: ReadLengthAndString
public virtual string ReadLengthAndString(IReadBuffer buffer)
{
int length = buffer.ReadInt();
if (length == 0)
{
return string.Empty;
}
return Read(buffer, length);
}
示例3: ReadDimensions
private void ReadDimensions(ArrayInfo info, IReadBuffer buffer, int dimensionCount
)
{
var dim = new int[dimensionCount];
for (var i = 0; i < dim.Length; i++)
{
dim[i] = buffer.ReadInt();
}
((MultidimensionalArrayInfo) info).Dimensions(dim);
info.ElementCount(ElementCount(dim));
}
示例4: DoWithSlotIndirection
public virtual object DoWithSlotIndirection(IReadBuffer buffer, IClosure4 closure
)
{
int payLoadOffset = buffer.ReadInt();
buffer.ReadInt();
// length, not used
int savedOffset = buffer.Offset();
object res = null;
if (payLoadOffset != 0)
{
buffer.Seek(payLoadOffset);
res = closure.Run();
}
buffer.Seek(savedOffset);
return res;
}
示例5: ReadElementTypeHandler
private static ITypeHandler4 ReadElementTypeHandler(IReadBuffer buffer, IContext context)
{
int elementHandlerId = buffer.ReadInt();
if (elementHandlerId == 0) return OpenTypeHandlerFrom(context);
ITypeHandler4 elementHandler = Container(context).TypeHandlerForClassMetadataID(elementHandlerId);
return elementHandler ?? OpenTypeHandlerFrom(context);
}
示例6: ReadDimensions
protected virtual void ReadDimensions(ArrayInfo info, IReadBuffer buffer)
{
info.ElementCount(buffer.ReadInt());
}
示例7: ReadInfo
protected virtual void ReadInfo(Transaction trans, IReadBuffer buffer, ArrayInfo
info)
{
int classID = buffer.ReadInt();
if (IsPreVersion0Format(classID))
{
throw new UnsupportedOldFormatException();
}
else
{
_versionHelper.ReadTypeInfo(trans, buffer, info, classID);
ReflectClassFromElementsEntry(Container(trans), info, classID);
ReadDimensions(info, buffer);
}
if (Debug4.ExceedsMaximumArrayEntries(info.ElementCount(), _usePrimitiveClassReflector
))
{
info.ElementCount(0);
}
}
示例8: ReadKeyValueTypeHandlers
private KeyValueHandlerPair ReadKeyValueTypeHandlers(IReadBuffer buffer, IContext
context)
{
buffer.ReadInt();
buffer.ReadInt();
ITypeHandler4 untypedHandler = (ITypeHandler4)Container(context).Handlers.OpenTypeHandler
();
return new KeyValueHandlerPair(untypedHandler, untypedHandler);
}
示例9: ReadAspectCount
public int ReadAspectCount(IReadBuffer buffer)
{
var count = buffer.ReadInt();
if (count > _aspects.Length)
{
return _aspects.Length;
}
return count;
}
示例10: ReadElementTypeHandler
private ITypeHandler4 ReadElementTypeHandler(IReadBuffer buffer, IContext context
)
{
buffer.ReadInt();
return (ITypeHandler4)Container(context).Handlers.OpenTypeHandler();
}
示例11: SkipData
private static void SkipData(IReadBuffer deleteContext)
{
int numBytes = deleteContext.ReadInt();
deleteContext.Seek(deleteContext.Offset() + numBytes);
}