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