本文整理汇总了C#中ITypedSettersV3类的典型用法代码示例。如果您正苦于以下问题:C# ITypedSettersV3类的具体用法?C# ITypedSettersV3怎么用?C# ITypedSettersV3使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITypedSettersV3类属于命名空间,在下文中一共展示了ITypedSettersV3类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SmiSettersStream
internal SmiSettersStream(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData)
{
this._sink = sink;
this._setters = setters;
this._ordinal = ordinal;
this._lengthWritten = 0L;
this._metaData = metaData;
}
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:SmiSettersStream.cs
示例2: SmiSettersStream
internal SmiSettersStream( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData ) {
Debug.Assert( null != sink );
Debug.Assert( null != setters );
Debug.Assert( 0 <= ordinal );
Debug.Assert( null != metaData );
_sink = sink;
_setters = setters;
_ordinal = ordinal;
_lengthWritten = 0;
_metaData = metaData;
}
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:12,代码来源:SmiSettersStream.cs
示例3: SetXmlReader_Unchecked
private static void SetXmlReader_Unchecked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, XmlReader xmlReader) {
// set up writer
XmlWriterSettings WriterSettings = new XmlWriterSettings();
WriterSettings.CloseOutput = false; // don't close the memory stream
WriterSettings.ConformanceLevel = ConformanceLevel.Fragment;
WriterSettings.Encoding = System.Text.Encoding.Unicode;
WriterSettings.OmitXmlDeclaration = true;
System.IO.Stream target = new SmiSettersStream(sink, setters, ordinal, SmiMetaData.DefaultXml);
XmlWriter xmlWriter = XmlWriter.Create(target, WriterSettings);
// now spool the data into the writer (WriteNode will call Read())
xmlReader.Read();
while (!xmlReader.EOF) {
xmlWriter.WriteNode(xmlReader, true);
}
xmlWriter.Flush();
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:20,代码来源:ValueUtilsSmi.cs
示例4: SetSqlString_Unchecked
private static void SetSqlString_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlString value, int offset, int length ) {
if ( value.IsNull ) {
setters.SetDBNull( sink, ordinal );
sink.ProcessMessagesAndThrow();
}
else {
if (SqlDbType.Variant == metaData.SqlDbType) {
// Set up a NVarChar metadata with correct LCID/Collation
metaData = new SmiMetaData(
SqlDbType.NVarChar,
SmiMetaData.MaxUnicodeCharacters,
0,
0,
value.LCID,
value.SqlCompareOptions,
null);
setters.SetVariantMetaData( sink, ordinal, metaData );
sink.ProcessMessagesAndThrow();
}
SetString_Unchecked( sink, setters, ordinal, value.Value, offset, length );
}
}
开发者ID:uQr,项目名称:referencesource,代码行数:22,代码来源:ValueUtilsSmi.cs
示例5: SetSqlMoney_Unchecked
private static void SetSqlMoney_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlMoney value ) {
if ( value.IsNull ) {
setters.SetDBNull( sink, ordinal );
}
else {
if ( SqlDbType.Variant == metaData.SqlDbType ) {
setters.SetVariantMetaData( sink, ordinal, SmiMetaData.DefaultMoney );
sink.ProcessMessagesAndThrow();
}
setters.SetInt64( sink, ordinal, value.ToSqlInternalRepresentation() );
}
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:14,代码来源:ValueUtilsSmi.cs
示例6: SetSqlBinary_Unchecked
private static void SetSqlBinary_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SqlBinary value, int offset, int length ) {
if ( value.IsNull ) {
setters.SetDBNull( sink, ordinal );
}
else {
SetByteArray_Unchecked( sink, setters, ordinal, value.Value, offset, length );
}
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:ValueUtilsSmi.cs
示例7: SetDate_Unchecked
private static void SetDate_Unchecked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, DateTime value)
{
Debug.Assert(SqlDbType.Variant == metaData.SqlDbType, "Invalid type. This should be called only when the type is variant.");
setters.SetVariantMetaData(sink, ordinal, SmiMetaData.DefaultDate);
setters.SetDateTime(sink, ordinal, value);
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:7,代码来源:ValueUtilsSmi.cs
示例8: SetDBNull_Unchecked
private static void SetDBNull_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal ) {
setters.SetDBNull( sink, ordinal );
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:4,代码来源:ValueUtilsSmi.cs
示例9: SetSqlMoney_Checked
private static void SetSqlMoney_Checked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlMoney value) {
if (!value.IsNull && SqlDbType.SmallMoney == metaData.SqlDbType) {
decimal decimalValue = value.Value;
if (TdsEnums.SQL_SMALL_MONEY_MIN > decimalValue || TdsEnums.SQL_SMALL_MONEY_MAX < decimalValue) {
throw SQL.MoneyOverflow(decimalValue.ToString(CultureInfo.InvariantCulture));
}
}
SetSqlMoney_Unchecked(sink, setters, ordinal, metaData, value);
}
开发者ID:uQr,项目名称:referencesource,代码行数:9,代码来源:ValueUtilsSmi.cs
示例10: SetDate_Checked
private static void SetDate_Checked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, DateTime value)
{
VerifyDateTimeRange(metaData.SqlDbType, value);
SetDate_Unchecked(sink, setters, ordinal, metaData, value);
}
开发者ID:uQr,项目名称:referencesource,代码行数:5,代码来源:ValueUtilsSmi.cs
示例11: SetSqlDateTime_Checked
private static void SetSqlDateTime_Checked(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlDateTime value) {
if (!value.IsNull) {
VerifyDateTimeRange(metaData.SqlDbType, value.Value);
}
SetSqlDateTime_Unchecked(sink, setters, ordinal, value);
}
开发者ID:uQr,项目名称:referencesource,代码行数:6,代码来源:ValueUtilsSmi.cs
示例12: SetDecimal_PossiblyMoney
private static void SetDecimal_PossiblyMoney(SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, Decimal value) {
if (SqlDbType.Decimal == metaData.SqlDbType || SqlDbType.Variant == metaData.SqlDbType) {
SetDecimal_Unchecked( sink, setters, ordinal, value );
}
else {
Debug.Assert( SqlDbType.Money == metaData.SqlDbType ||
SqlDbType.SmallMoney == metaData.SqlDbType,
"Unexpected sqldbtype=" + metaData.SqlDbType);
SetSqlMoney_Checked( sink, setters, ordinal, metaData, new SqlMoney(value) );
}
}
开发者ID:uQr,项目名称:referencesource,代码行数:11,代码来源:ValueUtilsSmi.cs
示例13: FillCompatibleITypedSettersFromRecord
internal static void FillCompatibleITypedSettersFromRecord(SmiEventSink_Default sink, ITypedSettersV3 setters, SmiMetaData[] metaData, SqlDataRecord record, SmiDefaultFieldsProperty useDefaultValues) {
for (int i = 0; i < metaData.Length; ++i) {
if (null != useDefaultValues && useDefaultValues[i]) {
continue;
}
if (record.IsDBNull(i)) {
ValueUtilsSmi.SetDBNull_Unchecked(sink, setters, i);
} else {
switch (metaData[i].SqlDbType) {
case SqlDbType.BigInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int64 ) );
SetInt64_Unchecked( sink, setters, i, record.GetInt64(i) );
break;
case SqlDbType.Binary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetBytes_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.Bit:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Boolean ) );
SetBoolean_Unchecked( sink, setters, i, record.GetBoolean(i) );
break;
case SqlDbType.Char:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetChars_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.DateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], record.GetDateTime(i) );
break;
case SqlDbType.Decimal:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlDecimal ) );
SetSqlDecimal_Unchecked( sink, setters, i, record.GetSqlDecimal(i) );
break;
case SqlDbType.Float:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Double ) );
SetDouble_Unchecked( sink, setters, i, record.GetDouble(i) );
break;
case SqlDbType.Image:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetBytes_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.Int:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int32 ) );
SetInt32_Unchecked( sink, setters, i, record.GetInt32(i) );
break;
case SqlDbType.Money:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Unchecked( sink, setters, i, metaData[i], record.GetSqlMoney(i) );
break;
case SqlDbType.NChar:
case SqlDbType.NText:
case SqlDbType.NVarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetChars_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.Real:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Single ) );
SetSingle_Unchecked( sink, setters, i, record.GetFloat(i) );
break;
case SqlDbType.UniqueIdentifier:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Guid ) );
SetGuid_Unchecked( sink, setters, i, record.GetGuid(i) );
break;
case SqlDbType.SmallDateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], record.GetDateTime(i) );
break;
case SqlDbType.SmallInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int16 ) );
SetInt16_Unchecked( sink, setters, i, record.GetInt16(i) );
break;
case SqlDbType.SmallMoney:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Checked( sink, setters, i, metaData[i], record.GetSqlMoney(i) );
break;
case SqlDbType.Text:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetChars_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.Timestamp:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetBytes_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.TinyInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Byte ) );
SetByte_Unchecked( sink, setters, i, record.GetByte(i) );
break;
case SqlDbType.VarBinary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetBytes_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.VarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.String ) );
SetChars_FromRecord( sink, setters, i, metaData[i], record, 0 );
break;
case SqlDbType.Xml:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlXml ) );
SetSqlXml_Unchecked( sink, setters, i, record.GetSqlXml(i) ); // perf improvement?
break;
case SqlDbType.Variant:
//.........这里部分代码省略.........
开发者ID:uQr,项目名称:referencesource,代码行数:101,代码来源:ValueUtilsSmi.cs
示例14: FillCompatibleITypedSettersFromReader
// Copy multiple fields from reader to ITypedSettersV3
// Assumes caller enforces that reader and setter metadata are compatible
internal static void FillCompatibleITypedSettersFromReader( SmiEventSink_Default sink, ITypedSettersV3 setters, SmiMetaData[] metaData, SqlDataReader reader ) {
for ( int i = 0; i < metaData.Length; i++ ) {
if ( reader.IsDBNull(i) ) {
ValueUtilsSmi.SetDBNull_Unchecked( sink, setters, i );
}
else {
switch ( metaData[i].SqlDbType ) {
case SqlDbType.BigInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int64 ) );
ValueUtilsSmi.SetInt64_Unchecked( sink, setters, i, reader.GetInt64(i) );
break;
case SqlDbType.Binary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
ValueUtilsSmi.SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.Bit:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Boolean ) );
SetBoolean_Unchecked( sink, setters, i, reader.GetBoolean(i) );
break;
case SqlDbType.Char:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.DateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], reader.GetDateTime(i) );
break;
case SqlDbType.Decimal:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlDecimal ) );
SetSqlDecimal_Unchecked( sink, setters, i, reader.GetSqlDecimal(i) );
break;
case SqlDbType.Float:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Double ) );
SetDouble_Unchecked( sink, setters, i, reader.GetDouble(i) );
break;
case SqlDbType.Image:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.Int:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int32 ) );
SetInt32_Unchecked( sink, setters, i, reader.GetInt32(i) );
break;
case SqlDbType.Money:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Unchecked( sink, setters, i, metaData[i], reader.GetSqlMoney(i) );
break;
case SqlDbType.NChar:
case SqlDbType.NText:
case SqlDbType.NVarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Real:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Single ) );
SetSingle_Unchecked( sink, setters, i, reader.GetFloat(i) );
break;
case SqlDbType.UniqueIdentifier:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Guid ) );
SetGuid_Unchecked( sink, setters, i, reader.GetGuid(i) );
break;
case SqlDbType.SmallDateTime:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.DateTime ) );
SetDateTime_Checked( sink, setters, i, metaData[i], reader.GetDateTime(i) );
break;
case SqlDbType.SmallInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Int16 ) );
SetInt16_Unchecked( sink, setters, i, reader.GetInt16(i) );
break;
case SqlDbType.SmallMoney:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlMoney ) );
SetSqlMoney_Checked( sink, setters, i, metaData[i], reader.GetSqlMoney(i) );
break;
case SqlDbType.Text:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlChars ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Timestamp:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.TinyInt:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.Byte ) );
SetByte_Unchecked( sink, setters, i, reader.GetByte(i) );
break;
case SqlDbType.VarBinary:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlBytes ) );
SetSqlBytes_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlBytes(i), 0 );
break;
case SqlDbType.VarChar:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.String ) );
SetSqlChars_LengthChecked( sink, setters, i, metaData[i], reader.GetSqlChars(i), 0 );
break;
case SqlDbType.Xml:
Debug.Assert( CanAccessSetterDirectly( metaData[i], ExtendedClrTypeCode.SqlXml ) );
SetSqlXml_Unchecked( sink, setters, i, reader.GetSqlXml(i) );
break;
case SqlDbType.Variant:
//.........这里部分代码省略.........
开发者ID:uQr,项目名称:referencesource,代码行数:101,代码来源:ValueUtilsSmi.cs
示例15: SetCharArray_Unchecked
private static void SetCharArray_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, char[] buffer, int bufferOffset, int length ) {
if ( length > 0 ) {
setters.SetChars( sink, ordinal, 0, buffer, bufferOffset, length );
sink.ProcessMessagesAndThrow();
}
setters.SetCharsLength( sink, ordinal, length );
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:8,代码来源:ValueUtilsSmi.cs
示例16: SetChars_Unchecked
private static int SetChars_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, long fieldOffset, char[] buffer, int bufferOffset, int length ) {
int result = setters.SetChars( sink, ordinal, fieldOffset, buffer, bufferOffset, length );
sink.ProcessMessagesAndThrow();
return result;
}
开发者ID:uQr,项目名称:referencesource,代码行数:5,代码来源:ValueUtilsSmi.cs
示例17: SetCharArray_LengthChecked
private static void SetCharArray_LengthChecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, char[] buffer, int offset ) {
int length = CheckXetParameters( metaData.SqlDbType, metaData.MaxLength, NoLengthLimit /* actual */, 0, buffer.Length, offset, buffer.Length - offset );
Debug.Assert( length >= 0, "buffer.Length was invalid!" );
SetCharArray_Unchecked( sink, setters, ordinal, buffer, offset, length );
}
开发者ID:uQr,项目名称:referencesource,代码行数:5,代码来源:ValueUtilsSmi.cs
示例18: SetDecimal_Unchecked
private static void SetDecimal_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, Decimal value ) {
setters.SetSqlDecimal( sink, ordinal, new SqlDecimal( value ) );
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:4,代码来源:ValueUtilsSmi.cs
示例19: SetChars_FromRecord
private static void SetChars_FromRecord( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, SmiMetaData metaData, SqlDataRecord record, int offset ) {
int length = 0;
// Deal with large values by sending bufferLength of NoLengthLimit
// CheckXetParameters will ignore length checks in this case
long bufferLength = record.GetChars(ordinal, 0, null, 0, 0);
if ( bufferLength > Int32.MaxValue ) {
bufferLength = NoLengthLimit;
}
length = CheckXetParameters( metaData.SqlDbType, metaData.MaxLength, NoLengthLimit /* actual */, 0, checked( (int) bufferLength ), offset, checked( (int) bufferLength - offset ) );
int chunkSize;
if ( length > __maxCharChunkSize || length < 0 ) {
if (MetaDataUtilsSmi.IsAnsiType(metaData.SqlDbType)) {
chunkSize = __maxByteChunkSize;
} else {
chunkSize = __maxCharChunkSize;
}
}
else {
chunkSize = checked( (int)length );
}
char[] buffer = new char[ chunkSize ];
long charsRead;
long charsWritten = 1; // prime value to get into write loop
long currentOffset = offset;
long lengthWritten = 0;
while ( (length < 0 || lengthWritten < length) &&
0 != ( charsRead = record.GetChars( ordinal, currentOffset, buffer, 0, chunkSize ) ) &&
0 != charsWritten ) {
charsWritten = setters.SetChars( sink, ordinal, currentOffset, buffer, 0, checked( (int) charsRead ) );
sink.ProcessMessagesAndThrow();
checked{ currentOffset += charsWritten; }
checked{ lengthWritten += charsWritten;}
}
// Make sure to trim any left-over data
setters.SetCharsLength( sink, ordinal, currentOffset );
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:42,代码来源:ValueUtilsSmi.cs
示例20: SetSingle_Unchecked
private static void SetSingle_Unchecked( SmiEventSink_Default sink, ITypedSettersV3 setters, int ordinal, Single value ) {
setters.SetSingle( sink, ordinal, value );
sink.ProcessMessagesAndThrow();
}
开发者ID:uQr,项目名称:referencesource,代码行数:4,代码来源:ValueUtilsSmi.cs
注:本文中的ITypedSettersV3类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论