21 writes to _inBytesUsed
System.Data (21)
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (21)
990
_inBytesUsed
+= copy;
1032
_inBytesUsed
+= _inputHeaderLen;
1132
_inBytesUsed
= 0;
1151
_inBytesUsed
= 0;
1159
_inBytesUsed
= 0;
1187
_inBytesUsed
--;
1239
_inBytesUsed
+= bytesToRead;
1284
value = (_inBuff[
_inBytesUsed
++]);
1314
_inBytesUsed
+= 2;
1347
_inBytesUsed
+= 2;
1378
_inBytesUsed
+= 4;
1421
_inBytesUsed
+= 8;
1453
_inBytesUsed
+= 2;
1497
_inBytesUsed
+= 4;
1527
_inBytesUsed
+= 4;
1557
_inBytesUsed
+= 8;
1591
_inBytesUsed
+= cBytes;
1656
_inBytesUsed
+= length;
2419
_inBytesUsed
= 0;
3633
_stateObj.
_inBytesUsed
= 0;
3678
_stateObj.
_inBytesUsed
= _snapshotInBytesUsed;
56 references to _inBytesUsed
System.Data (56)
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (1)
3562
int bytesRemaining = Math.Min(checked(_stateObj._inBytesRead - _stateObj.
_inBytesUsed
), _stateObj._inBytesPacket);
fx\src\data\System\Data\SqlClient\TdsParser.cs (3)
2714
if (stateObj._inBytesRead > stateObj.
_inBytesUsed
) {
2734
Debug.Assert(stateObj.
_inBytesUsed
== stateObj._inBytesRead && stateObj._inBytesPacket == 0, "DONE_ATTN received with more data left on wire");
2789
if (stateObj.
_inBytesUsed
>= stateObj._inBytesRead) {
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (52)
470
int bytesRemaining = Math.Min(_inBytesPacket, _inBytesRead -
_inBytesUsed
) - 1;
473
if (_inBuff[
_inBytesUsed
] == TdsEnums.SQLROW) {
477
else if (_inBuff[
_inBytesUsed
] == TdsEnums.SQLNBCROW) {
980
if ((_partialHeaderBytesRead > 0) || (
_inBytesUsed
+ _inputHeaderLen > _inBytesRead)) {
985
int copy = Math.Min(_inBytesRead -
_inBytesUsed
, _inputHeaderLen - _partialHeaderBytesRead);
988
Buffer.BlockCopy(_inBuff,
_inBytesUsed
, _partialHeaderBuffer, _partialHeaderBytesRead, copy);
1002
Debug.Assert(
_inBytesUsed
== _inBytesRead, "Did not use all data while reading partial header");
1029
_messageStatus = _inBuff[
_inBytesUsed
+ 1];
1030
_inBytesPacket = ((int)_inBuff[
_inBytesUsed
+ TdsEnums.HEADER_LEN_FIELD_OFFSET] << 8 |
1031
(int)_inBuff[
_inBytesUsed
+ TdsEnums.HEADER_LEN_FIELD_OFFSET + 1]) - _inputHeaderLen;
1054
if ((_inBytesPacket == 0) && (
_inBytesUsed
< _inBytesRead)) {
1063
if (
_inBytesUsed
== _inBytesRead) {
1084
if (
_inBytesUsed
== _inBytesRead) {
1136
if (_inBytesRead >
_inBytesUsed
) {
1143
int remainingData = _inBytesRead -
_inBytesUsed
;
1144
if ((temp.Length <
_inBytesUsed
+ remainingData) || (_inBuff.Length < remainingData)) {
1145
string errormessage = Res.GetString(Res.SQL_InvalidInternalPacketSize) + ' ' + temp.Length + ", " +
_inBytesUsed
+ ", " + remainingData + ", " + _inBuff.Length;
1148
Buffer.BlockCopy(temp,
_inBytesUsed
, _inBuff, 0, remainingData);
1150
_inBytesRead = _inBytesRead -
_inBytesUsed
;
1226
if ((_inBytesPacket == 0) || (
_inBytesUsed
== _inBytesRead)) {
1232
int bytesToRead = Math.Min(len, Math.Min(_inBytesPacket, _inBytesRead -
_inBytesUsed
));
1235
Buffer.BlockCopy(_inBuff,
_inBytesUsed
, buff, offset + totalRead, bytesToRead);
1253
Debug.Assert(
_inBytesUsed
>= 0 &&
_inBytesUsed
<= _inBytesRead, "ERROR - TDSParser: _inBytesUsed < 0 or _inBytesUsed > _inBytesRead");
1272
if ((_inBytesPacket == 0) || (
_inBytesUsed
== _inBytesRead)) {
1295
if (((
_inBytesUsed
+ 2) > _inBytesRead) || (_inBytesPacket < 2)) {
1312
offset =
_inBytesUsed
;
1328
if (((
_inBytesUsed
+ 2) > _inBytesRead) || (_inBytesPacket < 2)) {
1345
offset =
_inBytesUsed
;
1359
if (((
_inBytesUsed
+ 4) > _inBytesRead) || (_inBytesPacket < 4)) {
1376
value = BitConverter.ToInt32(_inBuff,
_inBytesUsed
);
1389
if ((_inBytesPacket == 0) || (
_inBytesUsed
== _inBytesRead)) {
1396
if ((_bTmpRead > 0) || (((
_inBytesUsed
+ 8) > _inBytesRead) || (_inBytesPacket < 8))) {
1419
value = BitConverter.ToInt64(_inBuff,
_inBytesUsed
);
1434
if (((
_inBytesUsed
+ 2) > _inBytesRead) || (_inBytesPacket < 2)) {
1451
offset =
_inBytesUsed
;
1465
if ((_inBytesPacket == 0) || (
_inBytesUsed
== _inBytesRead)) {
1472
if ((_bTmpRead > 0) || (((
_inBytesUsed
+ 4) > _inBytesRead) || (_inBytesPacket < 4))) {
1495
value = BitConverter.ToUInt32(_inBuff,
_inBytesUsed
);
1508
if (((
_inBytesUsed
+ 4) > _inBytesRead) || (_inBytesPacket < 4)) {
1525
value = BitConverter.ToSingle(_inBuff,
_inBytesUsed
);
1538
if (((
_inBytesUsed
+ 8) > _inBytesRead) || (_inBytesPacket < 8)) {
1555
value = BitConverter.ToDouble(_inBuff,
_inBytesUsed
);
1572
if (((
_inBytesUsed
+ cBytes) > _inBytesRead) || (_inBytesPacket < cBytes)) {
1590
offset =
_inBytesUsed
;
1637
if (((
_inBytesUsed
+ length) > _inBytesRead) || (_inBytesPacket < length)) {
1655
offset =
_inBytesUsed
;
3230
if (
_inBytesUsed
< 0 || _inBytesRead < 0) {
3234
_inBytesUsed
, _inBytesRead);
3236
else if (
_inBytesUsed
> _inBytesRead) {
3240
_inBytesUsed
, _inBytesRead);
3646
_snapshotInBytesUsed = _stateObj.
_inBytesUsed
;