1 write to _metaData
System.Data (1)
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (1)
45
_metaData
= md;
76 references to _metaData
System.Data (76)
fx\src\data\System\Data\SqlClient\TdsValueSetter.cs (76)
66
switch(
_metaData
.SqlDbType) {
100
Debug.Assert(false, "PLP-only types shouldn't get to this point. Type: " +
_metaData
.SqlDbType);
109
Debug.Assert(false, "Unexpected SqlDbType: " +
_metaData
.SqlDbType);
118
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetBoolean));
119
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
123
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
136
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetByte));
137
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
141
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
152
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetBytes));
179
Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(
_metaData
.SqlDbType,
_metaData
.IsMultiValued).IsLong,
180
"We're assuming long length types are sent as PLP. SqlDbType = " +
_metaData
.SqlDbType);
182
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
192
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetBytes));
203
Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(
_metaData
.SqlDbType,
_metaData
.IsMultiValued).IsLong,
204
"We're assuming long length types are sent as PLP. SqlDbType = " +
_metaData
.SqlDbType);
206
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
229
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetChars));
232
if (MetaDataUtilsSmi.IsAnsiType(
_metaData
.SqlDbType)) {
262
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
266
Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(
_metaData
.SqlDbType,
_metaData
.IsMultiValued).IsLong,
267
"We're assuming long length types are sent as PLP. SqlDbType = " +
_metaData
.SqlDbType);
281
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetChars));
292
Debug.Assert(!MetaType.GetMetaTypeFromSqlDbType(
_metaData
.SqlDbType,
_metaData
.IsMultiValued).IsLong,
293
"We're assuming long length types are sent as PLP. SqlDbType = " +
_metaData
.SqlDbType);
313
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetString));
316
if (MetaDataUtilsSmi.IsAnsiType(
_metaData
.SqlDbType)) {
329
else if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
378
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetInt16));
380
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
384
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
392
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetInt32));
393
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
397
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
405
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetInt64));
406
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
421
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
422
if (SqlDbType.SmallMoney ==
_metaData
.SqlDbType) {
425
else if (SqlDbType.Money ==
_metaData
.SqlDbType) {
438
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetSingle));
439
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
443
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
451
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetDouble));
452
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
456
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
464
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetSqlDecimal));
465
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
473
_stateObj.Parser.WriteSqlDecimal(SqlDecimal.ConvertToPrecScale(value,
_metaData
.Precision,
_metaData
.Scale), _stateObj);
480
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetDateTime));
481
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
504
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
505
if (SqlDbType.SmallDateTime ==
_metaData
.SqlDbType) {
506
TdsDateTime dt = MetaType.FromDateTime(value, (byte)
_metaData
.MaxLength);
511
} else if (SqlDbType.DateTime ==
_metaData
.SqlDbType) {
512
TdsDateTime dt = MetaType.FromDateTime(value, (byte)
_metaData
.MaxLength);
517
if (SqlDbType.DateTime2 ==
_metaData
.SqlDbType) {
518
Int64 time = value.TimeOfDay.Ticks / TdsEnums.TICKS_FROM_SCALE[
_metaData
.Scale];
519
_stateObj.WriteByteArray(BitConverter.GetBytes(time), (int)
_metaData
.MaxLength - 3, 0);
529
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetGuid));
534
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
538
Debug.Assert(
_metaData
.MaxLength == bytes.Length, "Unexpected uniqueid metadata length: " +
_metaData
.MaxLength);
540
_stateObj.WriteByte((byte)
_metaData
.MaxLength);
548
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetTime));
551
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
557
scale =
_metaData
.Scale;
558
length = (byte)
_metaData
.MaxLength;
568
SmiXetterAccessMap.IsSetterAccessValid(
_metaData
, SmiXetterTypeCode.XetDateTimeOffset));
571
if (SqlDbType.Variant ==
_metaData
.SqlDbType) {
580
scale =
_metaData
.Scale;
581
length = (byte)
_metaData
.MaxLength;