11 writes to _writePos
mscorlib (11)
system\io\filestream.cs (11)
945
_writePos
= 0;
1033
_writePos
= 0;
1399
_writePos
= 0;
1417
_writePos
= 0;
1435
_writePos
= 0;
1744
_writePos
= 0;
1787
_writePos
+= numBytes;
1807
_writePos
= 0;
1820
_writePos
= count;
2253
_writePos
+= numBytes;
2429
_writePos
++;
48 references to _writePos
mscorlib (48)
system\io\filestream.cs (48)
1192
if (
_writePos
> 0 && _pos +
_writePos
> len)
1193
len =
_writePos
+ _pos;
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
);
1241
if (
_writePos
> 0) FlushWrite(false);
1287
if (
_writePos
> 0) {
1337
if (
_writePos
> 0)
1361
Contract.Assert(
_writePos
== 0, "FileStream: Write buffer must be empty in FlushRead!");
1378
IAsyncResult asyncResult = BeginWriteCore(_buffer, 0,
_writePos
, null, null);
1397
WriteCore(_buffer, 0,
_writePos
);
1454
if (
_writePos
> 0) {
1510
Contract.Assert((_readPos==0 && _readLen==0 &&
_writePos
>= 0) || (
_writePos
==0 && _readPos <= _readLen), "We're either reading or writing, but not both.");
1518
if (
_writePos
> 0) FlushWrite(false);
1574
Contract.Assert(
_writePos
== 0, "_writePos == 0");
1616
Contract.Assert((_readPos==0 && _readLen==0 &&
_writePos
>= 0) || (
_writePos
==0 && _readPos <= _readLen), "We're either reading or writing, but not both.");
1623
if (
_writePos
> 0) {
1742
if(
_writePos
> 0) {
1764
if (
_writePos
== 0)
1781
if (
_writePos
> 0) {
1782
int numBytes = _bufferSize -
_writePos
; // space left in buffer
1786
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, numBytes);
1797
IAsyncResult result = BeginWriteCore(_buffer, 0,
_writePos
, null, null);
1802
WriteCore(_buffer, 0,
_writePos
);
1811
Contract.Assert(
_writePos
== 0, "FileStream cannot have buffered data to write here! Your stream will be corrupted.");
1819
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, count);
1903
Contract.Assert((_readPos == 0 && _readLen == 0 &&
_writePos
>= 0) || (
_writePos
== 0 && _readPos <= _readLen), "We're either reading or writing, but not both.");
1932
Contract.Assert(
_writePos
== 0, "FileStream must not have buffered write data here! Pipes should be unidirectional.");
1940
if (
_writePos
> 0) FlushWrite(false);
2015
Contract.Assert(
_writePos
== 0, "_writePos == 0");
2163
Contract.Assert((_readPos==0 && _readLen==0 &&
_writePos
>= 0) || (
_writePos
==0 && _readPos <= _readLen), "We're either reading or writing, but not both.");
2165
if (
_writePos
> 0) FlushWrite(false);
2215
Contract.Assert((_readPos == 0 && _readLen == 0 &&
_writePos
>= 0) || (
_writePos
== 0 && _readPos <= _readLen), "We're either reading or writing, but not both.");
2234
if (
_writePos
> 0)
2241
if (
_writePos
== 0)
2248
int n = _bufferSize -
_writePos
;
2251
if (
_writePos
== 0) _buffer = new byte[_bufferSize];
2252
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, numBytes);
2259
if (
_writePos
> 0)
2417
if (
_writePos
==0) {
2425
if (
_writePos
== _bufferSize)
2428
_buffer[
_writePos
] = value;