25 writes to _readPos
mscorlib (25)
system\io\filestream.cs (25)
943
_readPos
= 0;
1031
_readPos
= 0;
1242
_readPos
= 0;
1366
_readPos
= 0;
1415
_readPos
= 0;
1433
_readPos
= 0;
1460
_readPos
= 0;
1522
_readPos
= 0;
1530
_readPos
= 0;
1536
_readPos
+= n;
1560
_readPos
= 0;
1659
_readPos
= 0;
1671
_readPos
= 0;
1677
_readPos
= 0;
1740
_readPos
= 0;
1769
_readPos
= 0;
1925
_readPos
+= n;
1962
_readPos
= n;
1971
_readPos
= 0;
1981
_readPos
+= n;
1995
_readPos
= 0;
2169
_readPos
= 0;
2175
_readPos
++;
2244
_readPos
= 0;
2420
_readPos
= 0;
48 references to _readPos
mscorlib (48)
system\io\filestream.cs (48)
1227
Contract.Assert((
_readPos
== 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
1236
return _pos + (
_readPos
- _readLen + _writePos);
1341
else if (
_readPos
< _readLen && CanSeek)
1362
if (
_readPos
- _readLen != 0) {
1364
SeekCore(
_readPos
- _readLen, SeekOrigin.Current);
1374
Contract.Assert(
_readPos
== 0 && _readLen == 0, "FileStream: Read buffer must be empty in FlushWrite!");
1457
else if (
_readPos
< _readLen) {
1510
Contract.Assert((
_readPos
==0 && _readLen==0 && _writePos >= 0) || (_writePos==0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
1513
int n = _readLen -
_readPos
;
1535
Buffer.InternalBlockCopy(_buffer,
_readPos
, array, offset, n);
1555
Contract.Assert(
_readPos
== _readLen, "Read buffer should be empty!");
1616
Contract.Assert((
_readPos
==0 && _readLen==0 && _writePos >= 0) || (_writePos==0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
1630
offset -= (_readLen -
_readPos
);
1637
long oldPos = _pos + (
_readPos
- _readLen);
1655
if (
_readPos
> 0) {
1657
Buffer.InternalBlockCopy(_buffer,
_readPos
, _buffer, 0, _readLen -
_readPos
);
1658
_readLen -=
_readPos
;
1666
else if (oldPos -
_readPos
< pos && pos < oldPos + _readLen -
_readPos
) {
1669
Buffer.InternalBlockCopy(_buffer,
_readPos
+diff, _buffer, 0, _readLen - (
_readPos
+ diff));
1670
_readLen -= (
_readPos
+ diff);
1680
Contract.Assert(_readLen >= 0 &&
_readPos
<= _readLen, "_readLen should be nonnegative, and _readPos should be less than or equal _readLen");
1768
if (
_readPos
< _readLen) FlushRead();
1830
Contract.Assert(
_readPos
== _readLen, "_readPos == _readLen");
1903
Contract.Assert((
_readPos
== 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
1920
if (
_readPos
< _readLen)
1922
int n = _readLen -
_readPos
;
1924
Buffer.InternalBlockCopy(_buffer,
_readPos
, array, offset, n);
1941
if (
_readPos
== _readLen)
1978
int n = _readLen -
_readPos
;
1980
Buffer.InternalBlockCopy(_buffer,
_readPos
, array, offset, n);
2163
Contract.Assert((
_readPos
==0 && _readLen==0 && _writePos >= 0) || (_writePos==0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
2164
if (
_readPos
== _readLen) {
2171
if (
_readPos
== _readLen)
2174
int result = _buffer[
_readPos
];
2215
Contract.Assert((
_readPos
== 0 && _readLen == 0 && _writePos >= 0) || (_writePos == 0 &&
_readPos
<= _readLen), "We're either reading or writing, but not both.");
2232
Contract.Assert(
_readPos
== 0 && _readLen == 0, "FileStream must not have buffered data here! Pipes should be unidirectional.");
2243
if (
_readPos
< _readLen) FlushRead();
2275
Contract.Assert(
_readPos
== _readLen, "_readPos == _readLen");
2419
if (
_readPos
< _readLen) FlushRead();