11 writes to _writePos
mscorlib (11)
system\io\bufferedstream.cs (11)
328
_writePos
= _readPos = _readLen = 0;
446
_writePos
= 0;
460
_writePos
= 0;
836
_writePos
+= bytesToWrite;
957
_writePos
= 0;
978
_writePos
= 0;
983
_writePos
= 0;
1194
_writePos
= 0;
1221
_writePos
= 0;
1232
_writePos
= 0;
1267
_buffer[
_writePos
++] = value;
53 references to _writePos
mscorlib (53)
system\io\bufferedstream.cs (53)
183
Buffer.InternalBlockCopy(_buffer, 0, shadowBuffer, 0,
_writePos
);
234
if (
_writePos
> 0)
247
Contract.Assert(! (
_writePos
> 0 && _readPos != _readLen), "Read and Write buffers cannot both have data in them at the same time.");
248
return _stream.Position + (_readPos - _readLen +
_writePos
);
258
if (
_writePos
> 0)
296
if (
_writePos
> 0) {
299
Contract.Assert(
_writePos
== 0 && _readPos == 0 && _readLen == 0);
320
Contract.Assert(
_writePos
== 0 && _readPos == 0 && _readLen == 0);
339
return FlushAsyncInternal(cancellationToken, this, _stream,
_writePos
, _readPos, _readLen);
359
Contract.Assert(_this.
_writePos
== 0 && _this._readPos == 0 && _this._readLen == 0);
379
Contract.Assert(_this.
_writePos
== 0 && _this._readPos == 0 && _this._readLen == 0);
388
Contract.Assert(_this.
_writePos
== 0 && _this._readPos == _this._readLen);
402
Contract.Assert(
_writePos
== 0, "BufferedStream: Write buffer must be empty in FlushRead!");
442
Contract.Assert(_buffer != null && _bufferSize >=
_writePos
,
445
_stream.Write(_buffer, 0,
_writePos
);
456
Contract.Assert(_buffer != null && _bufferSize >=
_writePos
,
459
await _stream.WriteAsync(_buffer, 0,
_writePos
, cancellationToken).ConfigureAwait(false);
539
if (
_writePos
> 0)
767
if (
_writePos
> 0)
810
if (
_writePos
> 0)
828
Int32 bytesToWrite = Math.Min(_bufferSize -
_writePos
, count);
834
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, bytesToWrite);
870
if (
_writePos
== 0)
933
Contract.Assert(
_writePos
< _bufferSize);
938
totalUserBytes =
_writePos
+ count;
946
if (
_writePos
< _bufferSize) {
953
Contract.Assert(
_writePos
== _bufferSize);
956
_stream.Write(_buffer, 0,
_writePos
);
962
Contract.Assert(
_writePos
< _bufferSize);
967
if (
_writePos
> 0) {
976
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, count);
982
_stream.Write(_buffer, 0,
_writePos
);
1021
if (
_writePos
== 0)
1025
Contract.Assert(
_writePos
< _bufferSize);
1026
completeSynchronously = (count < _bufferSize -
_writePos
);
1106
if (
_writePos
== 0)
1109
Contract.Assert(
_writePos
< _bufferSize);
1112
completeSynchronously = (count < _bufferSize -
_writePos
);
1163
if (
_writePos
== 0)
1169
totalUserBytes =
_writePos
+ count;
1177
if (
_writePos
< _bufferSize) {
1184
Contract.Assert(
_writePos
== _bufferSize);
1189
_stream.BeginWrite(_buffer, 0,
_writePos
, BeginEndAwaitableAdapter.Callback, _beginEndAwaitable);
1192
await _stream.WriteAsync(_buffer, 0,
_writePos
, cancellationToken).ConfigureAwait(false);
1199
Contract.Assert(
_writePos
< _bufferSize);
1204
if (
_writePos
> 0) {
1213
Buffer.InternalBlockCopy(array, offset, _buffer,
_writePos
, count);
1227
_stream.BeginWrite(_buffer, 0,
_writePos
, BeginEndAwaitableAdapter.Callback, _beginEndAwaitable);
1230
await _stream.WriteAsync(_buffer, 0,
_writePos
, cancellationToken).ConfigureAwait(false);
1256
if (
_writePos
== 0) {
1264
if (
_writePos
>= _bufferSize - 1)
1269
Contract.Assert(
_writePos
< _bufferSize);
1279
if (
_writePos
> 0) {