The StreamTools ThreadSafeStream type exposes the following members.
Back to Top
Back to Top
Back to Top
Constructors
| Name | Description | |
|---|---|---|
| StreamTools ThreadSafeStream(Stream) |
Create a thread safe stream. Once any actions are complete the stream must be correctly disposed by the user.
| |
| StreamTools ThreadSafeStream(Stream, Boolean) |
Create a thread safe stream.
|
Methods
| Name | Description | |
|---|---|---|
Begins an asynchronous read operation. (Inherited from | ||
Begins an asynchronous write operation. (Inherited from | ||
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. (Inherited from | ||
Reads the bytes from the current stream and writes them to the destination stream. (Inherited from | ||
Reads all the bytes from the current stream and writes them to a destination stream, using a specified buffer size. (Inherited from | ||
| CopyTo(Stream, Int64, Int64, Int32, Double, Int32) |
Copies data specified by start and length properties from internal stream to the provided stream.
| |
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from | ||
| Obsolete. Allocates a (Inherited from | ||
| Dispose |
Disposes the internal stream if DiposeInnerStreamOnDispose is true.
Use Close() to close the inner stream regardless of DiposeInnerStreamOnDispose.
| |
| Dispose(Boolean) |
Disposes the internal stream. If DiposeInnerStreamOnDispose is false, forceDispose
must be true to dispose of the internal stream.
| |
Waits for the pending asynchronous read to complete. (Inherited from | ||
Ends an asynchronous write operation. (Inherited from | ||
| (Inherited from | ||
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from | ||
| Flush | When overridden in a derived class, clears all buffers for this stream and causes any buffered data to be written to the underlying device. (Overrides | |
| GetBuffer |
Attempts to return the buffer associated with the internal stream. In certain circumstances this is more efficient
than copying the stream contents into a new buffer using ToArray. If the internal stream is not a memory stream
will throw InvalidCastException. If access to the buffer is not allowed will throw an UnauthorizedAccessException.
| |
Serves as a hash function for a particular type. (Inherited from | ||
Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from | ||
Gets the (Inherited from | ||
Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from | ||
| MD5 |
Return the MD5 hash of the current StreamTools ThreadSafeStream as a string
| |
| MD5(Int64, Int32) |
Return the MD5 hash of part of the current StreamTools ThreadSafeStream as a string
| |
Creates a shallow copy of the current (Inherited from | ||
Creates a shallow copy of the current (Inherited from | ||
Provides support for a Contract. (Inherited from | ||
| Read | When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. (Overrides | |
Reads a byte from the stream and advances the position within the stream by one byte, or returns -1 if at the end of the stream. (Inherited from | ||
| Seek | When overridden in a derived class, sets the position within the current stream. (Overrides | |
| SetLength | When overridden in a derived class, sets the length of the current stream. (Overrides | |
| ToArray(Int32) |
Returns data from entire Stream
| |
| ToArray(Int64, Int64, Int32, Int32) |
Returns data from the specified portion of Stream
| |
Returns a string that represents the current object. (Inherited from | ||
| Write( Byte , Int64) |
Writes the provided buffer to the internal stream starting at the provided position within the internal stream
| |
| Write( Byte , Int32, Int32) | When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. (Overrides | |
Writes a byte to the current position in the stream and advances the position within the stream by one byte. (Inherited from |
Properties
| Name | Description | |
|---|---|---|
| CanRead | When overridden in a derived class, gets a value indicating whether the current stream supports reading. (Overrides | |
| CanSeek | When overridden in a derived class, gets a value indicating whether the current stream supports seeking. (Overrides | |
Gets a value that determines whether the current stream can time out. (Inherited from | ||
| CanWrite | When overridden in a derived class, gets a value indicating whether the current stream supports writing. (Overrides | |
| DiposeInnerStreamOnDispose |
If true the internal stream will be disposed once the data has been written to the network
| |
| Length |
The total length of the internal stream
(Overrides | |
| Position |
The current position of the internal stream
(Overrides | |
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out. (Inherited from | ||
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out. (Inherited from |
See Also