本文整理汇总了C#中ITypedGettersV3.GetBytes方法的典型用法代码示例。如果您正苦于以下问题:C# ITypedGettersV3.GetBytes方法的具体用法?C# ITypedGettersV3.GetBytes怎么用?C# ITypedGettersV3.GetBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ITypedGettersV3
的用法示例。
在下文中一共展示了ITypedGettersV3.GetBytes方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBytes_Unchecked
internal static int GetBytes_Unchecked( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length ) {
Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) );
Debug.Assert(ordinal >= 0, string.Format("Invalid ordinal: {0}", ordinal));
Debug.Assert(sink != null, "Null SmiEventSink");
Debug.Assert(getters != null, "Null getters");
Debug.Assert(fieldOffset >= 0, string.Format("Invalid field offset: {0}", fieldOffset));
Debug.Assert(buffer != null, "Null buffer");
Debug.Assert(bufferOffset >= 0 && length >= 0 && bufferOffset + length <= buffer.Length, string.Format("Bad offset or length. bufferOffset: {0}, length: {1}, buffer.Length{2}", bufferOffset, length, buffer.Length));
int result = getters.GetBytes( sink, ordinal, fieldOffset, buffer, bufferOffset, length );
sink.ProcessMessagesAndThrow();
return result;
}
示例2: GetBytes_Unchecked
private static int GetBytes_Unchecked(SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal, long fieldOffset, byte[] buffer, int bufferOffset, int length)
{
int num = getters.GetBytes(sink, ordinal, fieldOffset, buffer, bufferOffset, length);
sink.ProcessMessagesAndThrow();
return num;
}
示例3: GetByteArray_Unchecked
private static byte[] GetByteArray_Unchecked( SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal ) {
Debug.Assert( !IsDBNull_Unchecked( sink, getters, ordinal ) );
long length = getters.GetBytesLength( sink, ordinal );
sink.ProcessMessagesAndThrow();
int len = checked( (int)length );
byte[] buffer = new byte[len];
getters.GetBytes( sink, ordinal, 0, buffer, 0, len );
sink.ProcessMessagesAndThrow();
return buffer;
}
示例4: GetByteArray_Unchecked
private static byte[] GetByteArray_Unchecked(SmiEventSink_Default sink, ITypedGettersV3 getters, int ordinal)
{
long bytesLength = getters.GetBytesLength(sink, ordinal);
sink.ProcessMessagesAndThrow();
int length = (int) bytesLength;
byte[] buffer = new byte[length];
getters.GetBytes(sink, ordinal, 0L, buffer, 0, length);
sink.ProcessMessagesAndThrow();
return buffer;
}