Click or drag to resize
BlobStream Class

[This is preliminary documentation and is subject to change.]

This class is a workaround to DbDataReader.GetStream throwing an exception in MySql.Data By extending System.IO.Stream and encapsulating the datareader it is possible to stream the data instead of reading it all to a byte array
Inheritance Hierarchy

Namespace: Netadmin.Core
Assembly: Netadmin.Core (in Netadmin.Core.dll) Version: release/9.0@131b654fe7332b0776120c2b44d96c6cac5ac9a2
Syntax
public class BlobStream : Stream

The BlobStream type exposes the following members.

Constructors
  NameDescription
Public method void BlobStream(String, String)
Initializes a new instance of the BlobStream class
Top
Properties
  NameDescription
Public propertyBooleanCanRead (Overrides StreamCanRead.)
Public propertyBooleanCanSeek (Overrides StreamCanSeek.)
Public propertyBooleanCanTimeout
Gets a value that determines whether the current stream can time out.
(Inherited from Stream.)
Public propertyBooleanCanWrite (Overrides StreamCanWrite.)
Public propertyInt64Length (Overrides StreamLength.)
Public propertyInt64Position (Overrides StreamPosition.)
Public propertyInt32ReadTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to read before timing out.
(Inherited from Stream.)
Public propertyInt32WriteTimeout
Gets or sets a value, in miliseconds, that determines how long the stream will attempt to write before timing out.
(Inherited from Stream.)
Top
Methods
  NameDescription
Public methodIAsyncResultBeginRead(Byte, Int32, Int32, AsyncCallback, Object) (Inherited from Stream.)
Public methodIAsyncResultBeginWrite(Byte, Int32, Int32, AsyncCallback, Object) (Inherited from Stream.)
Public method void Close
Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. Instead of calling this method, ensure that the stream is properly disposed.
(Inherited from Stream.)
Public method void CopyTo(Stream)
Reads the bytes from the current stream and writes them to another stream.
(Inherited from Stream.)
Public method void CopyTo(Stream, Int32)
Reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
(Inherited from Stream.)
Public methodTaskCopyToAsync(Stream)
Asynchronously reads the bytes from the current stream and writes them to another stream.
(Inherited from Stream.)
Public methodTaskCopyToAsync(Stream, Int32)
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size.
(Inherited from Stream.)
Public methodTaskCopyToAsync(Stream, Int32, CancellationToken)
Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified buffer size and cancellation token.
(Inherited from Stream.)
Public methodObjRefCreateObjRef(Type)
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Protected methodWaitHandleCreateWaitHandle Obsolete.
Allocates a WaitHandle object.
(Inherited from Stream.)
Public method void Dispose
Releases all resources used by the Stream.
(Inherited from Stream.)
Protected method void Dispose(Boolean)
Releases the unmanaged resources used by the BlobStream and optionally releases the managed resources
(Overrides StreamDispose(Boolean).)
Public methodInt32EndRead(IAsyncResult) (Inherited from Stream.)
Public method void EndWrite(IAsyncResult) (Inherited from Stream.)
Public methodBooleanEquals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected method void Finalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public method void Flush (Overrides StreamFlush.)
Public methodTaskFlushAsync
Asynchronously clears all buffers for this stream and causes any buffered data to be written to the underlying device.
(Inherited from Stream.)
Public methodTaskFlushAsync(CancellationToken)
Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.
(Inherited from Stream.)
Public methodInt32GetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodObjectGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodTypeGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodObjectInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodObjectMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMarshalByRefObjectMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected method void ObjectInvariant Obsolete.
Provides support for a Contract.
(Inherited from Stream.)
Public method void Open(IDbFactory)
Public methodInt32Read(Byte, Int32, Int32) (Overrides StreamRead(Byte, Int32, Int32).)
Public methodTaskTResult, T: Int32ReadAsync(Byte, Int32, Int32)
Asynchronously reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read.
(Inherited from Stream.)
Public methodTaskTResult, T: Int32ReadAsync(Byte, Int32, Int32, CancellationToken)
Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests.
(Inherited from Stream.)
Public methodInt32ReadByte
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 Stream.)
Public methodInt64Seek(Int64, SeekOrigin) (Overrides StreamSeek(Int64, SeekOrigin).)
Public method void SetLength(Int64) (Overrides StreamSetLength(Int64).)
Public methodStringToString
Returns a string that represents the current object.
(Inherited from Object.)
Public method void Write(Byte, Int32, Int32) (Overrides StreamWrite(Byte, Int32, Int32).)
Public methodTaskWriteAsync(Byte, Int32, Int32)
Asynchronously writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written.
(Inherited from Stream.)
Public methodTaskWriteAsync(Byte, Int32, Int32, CancellationToken)
Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
(Inherited from Stream.)
Public method void WriteByte(Byte)
Writes a byte to the current position in the stream and advances the position within the stream by one byte.
(Inherited from Stream.)
Top
See Also