8 writes to _metaData
System.Data (8)
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (8)
1141
_metaData
= (_SqlMetaDataSet)_metaData.Clone();
2773
_metaData
= null;
2794
_metaData
= null;
3032
_metaData
= altMetaDataSet;
3038
_metaData
= _altMetaDataSetCollection.metaDataSet;
3746
_metaData
= null;
3754
_metaData
= metaData;
4766
_metaData
= _snapshot._metadata;
121 references to _metaData
System.Data (121)
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (121)
171
return
_metaData
.Length;
222
if (
_metaData
== null && !_metaDataConsumed) {
273
return
_metaData
;
719
if (!_stateObj.Parser.TrySkipRow(
_metaData
, _stateObj)) {
732
if (!_stateObj.Parser.TrySkipRow(
_metaData
, _sharedState._nextColumnHeaderToRead, _stateObj)) {
1138
if (null !=
_metaData
) {
1140
if (_snapshot != null && object.ReferenceEquals(_snapshot._metadata,
_metaData
)) {
1141
_metaData = (_SqlMetaDataSet)
_metaData
.Clone();
1144
_metaData
.visibleColumns = 0;
1146
Debug.Assert(null ==
_metaData
.indexMap, "non-null metaData indexmap");
1147
int[] indexMap = new int[
_metaData
.Length];
1149
indexMap[i] =
_metaData
.visibleColumns;
1151
if (!(
_metaData
[i].isHidden)) {
1152
_metaData
.visibleColumns++;
1155
_metaData
.indexMap = indexMap;
1167
return GetDataTypeNameInternal(
_metaData
[i]);
1232
return GetFieldTypeInternal(
_metaData
[i]);
1311
Debug.Assert(null !=
_metaData
[i].column, "MDAC 66681");
1312
return
_metaData
[i].column;
1321
return GetProviderSpecificFieldTypeInternal(
_metaData
[i]);
1402
if (null ==
_metaData
|| null ==
_metaData
.schemaTable) {
1405
_metaData
.schemaTable = BuildSchemaTable();
1406
Debug.Assert(null !=
_metaData
.schemaTable, "No schema information yet!");
1410
if (null !=
_metaData
) {
1411
return
_metaData
.schemaTable;
1431
MetaType mt =
_metaData
[i].metaType;
1435
throw SQL.XmlReaderNotSupportOnColumnType(
_metaData
[i].column);
1463
if (
_metaData
[i] != null &&
_metaData
[i].cipherMD != null) {
1464
throw SQL.StreamNotSupportOnEncryptedColumn(
_metaData
[i].column);
1469
MetaType mt =
_metaData
[i].metaType;
1471
throw SQL.StreamNotSupportOnColumnType(
_metaData
[i].column);
1511
MetaType mt =
_metaData
[i].metaType;
1513
throw SQL.NonBlobColumn(
_metaData
[i].column);
1562
if (
_metaData
[i] != null &&
_metaData
[i].cipherMD != null) {
1563
throw SQL.SequentialAccessNotSupportedOnEncryptedColumn(
_metaData
[i].column);
1578
if ((-1 == _sharedState._columnDataBytesRemaining) && (
_metaData
[i].metaType.IsPlp)) {
1592
if (
_metaData
[i].metaType.IsPlp) {
1611
if ((cb > _sharedState._columnDataBytesRemaining) && !
_metaData
[i].metaType.IsPlp) {
1628
if (
_metaData
[i].metaType.IsPlp) {
1667
if (
_metaData
[i].metaType.IsBinType) {
1671
Debug.Assert(
_metaData
[i].metaType.IsLong, "non long type?");
1672
Debug.Assert(
_metaData
[i].metaType.IsCharType, "non-char type?");
1675
if (
_metaData
[i].metaType.IsNCharType) {
1814
if (
_metaData
[i].metaType.IsPlp) {
1876
if (
_metaData
[i].cipherMD != null) {
1877
Debug.Assert(
_metaData
[i].baseTI != null, "_metaData[i].baseTI should not be null.");
1878
mt =
_metaData
[i].baseTI.metaType;
1881
mt =
_metaData
[i].metaType;
1887
throw SQL.TextReaderNotSupportOnColumnType(
_metaData
[i].column);
1892
if (
_metaData
[i].cipherMD != null) {
1893
throw SQL.SequentialAccessNotSupportedOnEncryptedColumn(
_metaData
[i].column);
1904
encoding =
_metaData
[i].encoding;
1945
if (
_metaData
[i].cipherMD != null) {
1946
Debug.Assert(
_metaData
[i].baseTI != null, @"_metaData[i].baseTI should not be null.");
1947
mt =
_metaData
[i].baseTI.metaType;
1950
mt =
_metaData
[i].metaType;
1956
if (
_metaData
[i].cipherMD != null) {
1957
Debug.Assert(
_metaData
[i].baseTI != null, @"_metaData[i].baseTI should not be null.");
1958
sqlDbType =
_metaData
[i].baseTI.type;
1961
sqlDbType =
_metaData
[i].type;
1973
if (
_metaData
[i].cipherMD != null) {
1974
throw SQL.SequentialAccessNotSupportedOnEncryptedColumn(
_metaData
[i].column);
2100
Debug.Assert(
_metaData
[i].metaType.IsPlp, "GetCharsFromPlpData called on a non-plp column!");
2104
if (!
_metaData
[i].metaType.IsCharType) {
2105
throw SQL.NonCharColumn(
_metaData
[i].column);
2128
bool isUnicode =
_metaData
[i].metaType.IsNCharType;
2168
cch = (long) _parser.ReadPlpAnsiChars(ref buffer, bufferIndex, length,
_metaData
[i], _stateObj);
2235
if (_typeSystem <= SqlConnectionString.TypeSystem.SQLServer2005 &&
_metaData
[i].IsNewKatmaiDateTimeType) {
2309
if (_typeSystem <= SqlConnectionString.TypeSystem.SQLServer2005 &&
_metaData
[i].IsNewKatmaiDateTimeType)
2367
if (_typeSystem <= SqlConnectionString.TypeSystem.SQLServer2005 &&
_metaData
[i].IsNewKatmaiDateTimeType) {
2423
return GetSqlValueFromSqlBufferInternal(_data[i],
_metaData
[i]);
2480
int copyLen = (values.Length <
_metaData
.visibleColumns) ? values.Length :
_metaData
.visibleColumns;
2483
values[
_metaData
.indexMap[i]] = GetSqlValueInternal(i);
2496
if (_typeSystem <= SqlConnectionString.TypeSystem.SQLServer2005 &&
_metaData
[i].IsNewKatmaiDateTimeType) {
2576
return GetValueFromSqlBufferInternal(_data[i],
_metaData
[i]);
2629
return GetFieldValueFromSqlBufferInternal<T>(_data[i],
_metaData
[i]);
2685
int copyLen = (values.Length <
_metaData
.visibleColumns) ? values.Length :
_metaData
.visibleColumns;
2699
values[
_metaData
.indexMap[i]] = GetValueFromSqlBufferInternal(_data[i],
_metaData
[i]);
2772
_altMetaDataSetCollection.metaDataSet =
_metaData
;
3034
Debug.Assert ((
_metaData
!= null), "Can't match up altrowmetadata");
3047
if (
_metaData
== null) {
3329
Debug.Assert(_sharedState._nextColumnHeaderToRead <=
_metaData
.Length, "_sharedState._nextColumnHeaderToRead too large");
3330
Debug.Assert(_sharedState._nextColumnDataToRead <=
_metaData
.Length, "_sharedState._nextColumnDataToRead too large");
3377
_SqlMetaData columnMetaData =
_metaData
[_sharedState._nextColumnDataToRead];
3455
(
_metaData
[i].type == SqlDbType.Timestamp), // Or Dev11 Bug #336820, Dev10 Bug #479607 (SqlClient: IsDBNull always returns false for timestamp datatype)
3491
_SqlMetaData columnMetaData =
_metaData
[_sharedState._nextColumnHeaderToRead];
3557
if ((_lastColumnWithDataChunkRead == _sharedState._nextColumnDataToRead) && (
_metaData
[_lastColumnWithDataChunkRead].metaType.IsPlp)) {
3588
var metaType =
_metaData
[currentColumn].metaType;
3594
byte typeAndMask = (byte)(
_metaData
[currentColumn].tdsType & TdsEnums.SQLLenMask);
3596
if (0 != (
_metaData
[currentColumn].tdsType & 0x80)) {
3600
else if (0 == (
_metaData
[currentColumn].tdsType & 0x0c)) {
3616
bytesRemaining = checked(bytesRemaining -
_metaData
[currentColumn].length);
3630
Debug.Assert(_sharedState._nextColumnHeaderToRead <=
_metaData
.Length, "_sharedState._nextColumnHeaderToRead too large");
3634
if ((_sharedState._nextColumnHeaderToRead > 0) && (
_metaData
[_sharedState._nextColumnHeaderToRead - 1].metaType.IsPlp)) {
3758
if (
_metaData
!= null) {
3759
_metaData
.schemaTable = null;
3863
if ((columnIndex < 0) || (columnIndex >=
_metaData
.Length)) {
3872
Debug.Assert(!_sharedState._dataReady ||
_metaData
!= null, "Data is ready, but there is no metadata?");
3873
if ((!_sharedState._dataReady) || (
_metaData
== null)) {
3885
Debug.Assert(!_sharedState._dataReady ||
_metaData
!= null, "Data is ready, but there is no metadata?");
3886
if ((!_sharedState._dataReady) || (
_metaData
== null)) {
3889
if ((columnIndex < 0) || (columnIndex >=
_metaData
.Length)) {
3905
Debug.Assert(!_sharedState._dataReady ||
_metaData
!= null, "Data is ready, but there is no metadata?");
3906
if ((!_sharedState._dataReady) || (
_metaData
== null)) {
3909
if ((columnIndex < 0) || (columnIndex >=
_metaData
.Length)) {
3922
Debug.Assert(!_sharedState._dataReady ||
_metaData
!= null, "Data is ready, but there is no metadata?");
3924
Debug.Assert(
_metaData
!= null, "_metaData is null, check MetaData before calling this method");
3927
Debug.Assert(columnIndex.Value >= 0 && columnIndex.Value <
_metaData
.Length, "Invalid column index");
4212
if ((!_haltRead) && ((!_sharedState._dataReady) || (WillHaveEnoughData(
_metaData
.Length - 1)))) {
4236
else if (WillHaveEnoughData(
_metaData
.Length - 1)) {
4238
result = TryReadColumn(
_metaData
.Length - 1, setTimeout: true);
4307
if (TryReadColumn(
_metaData
.Length - 1, true)) {
4434
var metaData =
_metaData
;
4515
return Task.FromResult<T>(GetFieldValueFromSqlBufferInternal<T>(_data[i],
_metaData
[i]));
4696
_metadata =
_metaData
,