Pass-through stream that ignores Dispose Useful for dealing with MemoryStreams that you want to re-use.
More...
|
| IgnoreDisposeStream (Stream sourceStream) |
| Creates a new IgnoreDisposeStream.
|
|
override void | Flush () |
| Flushes the underlying stream.
|
|
override int | Read (byte[] buffer, int offset, int count) |
| Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
|
|
override long | Seek (long offset, SeekOrigin origin) |
| Sets the position within the current stream.
|
|
override void | SetLength (long value) |
| Sets the length of the current stream.
|
|
override void | Write (byte[] buffer, int offset, int count) |
| Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
|
|
|
override void | Dispose (bool disposing) |
| Disposes of the underlying source stream if disposing is true and IgnoreDispose is false .
|
|
|
Stream | SourceStream [get, private set] |
| The source stream all other methods fall through to.
|
|
bool | IgnoreDispose [get, set] |
| If true the Dispose will be ignored, if false, will pass through to the SourceStream Set to true by default.
|
|
override bool | CanRead [get] |
| Can Read.
|
|
override bool | CanSeek [get] |
| Can Seek.
|
|
override bool | CanWrite [get] |
| Can write to the underlying stream.
|
|
override long | Length [get] |
| Gets the length of the underlying stream.
|
|
override long | Position [get, set] |
| Gets or sets the position of the underlying stream.
|
|
Pass-through stream that ignores Dispose Useful for dealing with MemoryStreams that you want to re-use.
◆ IgnoreDisposeStream()
NAudio.Utils.IgnoreDisposeStream.IgnoreDisposeStream |
( |
Stream | sourceStream | ) |
|
|
inline |
Creates a new IgnoreDisposeStream.
- Parameters
-
sourceStream | The source stream |
◆ Dispose()
override void NAudio.Utils.IgnoreDisposeStream.Dispose |
( |
bool | disposing | ) |
|
|
inlineprotected |
Disposes of the underlying source stream if disposing is true
and IgnoreDispose is false
.
- Parameters
-
disposing | A System.Boolean value indicating whether the method is being called from user code (true) or from a finalizer (false). |
- Exceptions
-
ObjectDisposedException | Thrown if the method is called after the source stream has been disposed. |
◆ Flush()
override void NAudio.Utils.IgnoreDisposeStream.Flush |
( |
| ) |
|
|
inline |
Flushes the underlying stream.
This method flushes the underlying stream, writing any buffered data to the underlying file or network.
◆ Read()
override int NAudio.Utils.IgnoreDisposeStream.Read |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
- Parameters
-
buffer | An array of bytes. When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source. |
offset | The zero-based byte offset in buffer at which to begin storing the data read from the current stream. |
count | The maximum number of bytes to be read from the current stream. |
- Returns
- The total number of bytes read into the buffer. This might be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream is reached.
◆ Seek()
override long NAudio.Utils.IgnoreDisposeStream.Seek |
( |
long | offset, |
|
|
SeekOrigin | origin ) |
|
inline |
Sets the position within the current stream.
- Parameters
-
offset | A byte offset relative to the origin parameter. |
origin | A value of type System.IO.SeekOrigin indicating the reference point used to obtain the new position. |
- Returns
- The new position within the current stream.
◆ SetLength()
override void NAudio.Utils.IgnoreDisposeStream.SetLength |
( |
long | value | ) |
|
|
inline |
Sets the length of the current stream.
- Parameters
-
value | The desired length of the current stream in bytes. |
- Exceptions
-
System.IO.IOException | An I/O error occurs. |
◆ Write()
override void NAudio.Utils.IgnoreDisposeStream.Write |
( |
byte[] | buffer, |
|
|
int | offset, |
|
|
int | count ) |
|
inline |
Writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
- Parameters
-
buffer | An array of bytes. This method copies count bytes from buffer to the current stream. |
offset | The zero-based byte offset in buffer at which to begin copying bytes to the current stream. |
count | The number of bytes to be written to the current stream. |
- Exceptions
-
System.ArgumentNullException | Thrown when buffer is null. |
System.ArgumentOutOfRangeException | Thrown when offset or count is negative. |
◆ CanRead
override bool NAudio.Utils.IgnoreDisposeStream.CanRead |
|
get |
◆ CanSeek
override bool NAudio.Utils.IgnoreDisposeStream.CanSeek |
|
get |
◆ CanWrite
override bool NAudio.Utils.IgnoreDisposeStream.CanWrite |
|
get |
Can write to the underlying stream.
◆ IgnoreDispose
bool NAudio.Utils.IgnoreDisposeStream.IgnoreDispose |
|
getset |
If true the Dispose will be ignored, if false, will pass through to the SourceStream Set to true by default.
◆ Length
override long NAudio.Utils.IgnoreDisposeStream.Length |
|
get |
Gets the length of the underlying stream.
◆ Position
override long NAudio.Utils.IgnoreDisposeStream.Position |
|
getset |
Gets or sets the position of the underlying stream.
◆ SourceStream
Stream NAudio.Utils.IgnoreDisposeStream.SourceStream |
|
getprivate set |
The source stream all other methods fall through to.
The documentation for this class was generated from the following file:
- /Users/sumansaurabh/Documents/my-startup/xeno-rat/Plugins/LiveMicrophone/lib/NAudio.Core/Utils/IgnoreDisposeStream.cs