52 references to Mode
WindowsBase (52)
Base\MS\Internal\IO\Packaging\CompressStream.cs (52)
87
case
Mode
.Start:
93
ChangeMode(
Mode
.ReadPassThrough);
96
ChangeMode(
Mode
.Emulation);
101
case
Mode
.ReadPassThrough: // continue in ReadPassThrough mode
102
case
Mode
.Emulation: // continue to read from existing emulation stream
107
case
Mode
.WritePassThrough: // enter Emulation mode
111
ChangeMode(
Mode
.ReadPassThrough);
113
ChangeMode(
Mode
.Emulation);
126
if (_mode ==
Mode
.ReadPassThrough && bytesRead == 0)
132
ChangeMode(
Mode
.Start);
161
case
Mode
.Start: // enter WritePassThrough mode if possible
168
ChangeMode(
Mode
.WritePassThrough);
170
ChangeMode(
Mode
.Emulation);
173
case
Mode
.WritePassThrough: // continue in Write mode
174
case
Mode
.Emulation: // continue to read from existing emulation stream
178
case
Mode
.ReadPassThrough: // enter Emulation mode
180
ChangeMode(
Mode
.Emulation); break;
191
if (_mode ==
Mode
.WritePassThrough)
222
ChangeMode(
Mode
.Emulation); // has no effect if already in Emulation mode
240
&& (_mode ==
Mode
.ReadPassThrough))
253
ChangeMode(
Mode
.Start);
259
ChangeMode(
Mode
.Emulation); // No-op if already in Emulation
283
case
Mode
.Start:
284
case
Mode
.WritePassThrough:
285
case
Mode
.ReadPassThrough:
290
ChangeMode(
Mode
.Start); // discard any existing deflate stream
295
ChangeMode(
Mode
.Emulation);
300
case
Mode
.Emulation: break;
305
if (_mode ==
Mode
.Emulation)
336
if ((_mode ==
Mode
.Emulation) && (Length != 0))
380
case
Mode
.Start:
381
case
Mode
.WritePassThrough:
382
case
Mode
.ReadPassThrough:
393
ChangeMode(
Mode
.Emulation);
398
case
Mode
.Emulation: break;
419
return (_mode !=
Mode
.Disposed) && _baseStream.CanRead;
432
return (_mode !=
Mode
.Disposed) && _baseStream.CanSeek;
445
return (_mode !=
Mode
.Disposed) && _baseStream.CanWrite;
514
return (_mode ==
Mode
.Disposed);
538
if (_mode !=
Mode
.Disposed)
568
ChangeMode(
Mode
.Disposed);
586
ChangeMode(
Mode
.Start);
678
private void ChangeMode(
Mode
newMode)
697
case
Mode
.Start:
704
case
Mode
.ReadPassThrough:
705
case
Mode
.WritePassThrough:
711
newMode ==
Mode
.WritePassThrough ? CompressionMode.Compress : CompressionMode.Decompress,
716
case
Mode
.Emulation:
729
case
Mode
.Disposed: break;
775
Debug.Assert(_mode !=
Mode
.Emulation, "Logic error: CachedLength not maintained in Emulation mode - illegal Get");
781
Debug.Assert(_mode !=
Mode
.Emulation, "Logic error: CachedLength not maintained in Emulation mode - illegal Set");
803
private
Mode
_mode; // current stream mode