Click or drag to resize

DbStoredProcImageAccessor Class

This class can be used with IDbImageSource to get images from a database through Stored Procedures. The Stored Procedures to call can be specified in the constructor and the only requirement is that they meet certain specifications as described in the constructor parameter documentation.
Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.ImageSources.DataDbCommandImageAccessor
    Atalasoft.Imaging.ImageSources.DataDbStoredProcImageAccessor

Namespace:  Atalasoft.Imaging.ImageSources.Data
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
[SerializableAttribute]
public class DbStoredProcImageAccessor : DbCommandImageAccessor

The DbStoredProcImageAccessor type exposes the following members.

Constructors
  NameDescription
Protected methodDbStoredProcImageAccessor(SerializationInfo, StreamingContext)
From ISerializable. All properties are encrypted if encryptSerializedState was set to true in the constructor. They are encrypted using the encryptor
Public methodDbStoredProcImageAccessor(GetConnectionCallback, Boolean, String, String, IDictionary)
Construct an accessor that can access images in a database via stored procedures
Public methodDbStoredProcImageAccessor(GetConnectionCallback, Boolean, String, String, String, IDictionary)
Construct an accessor that can access images in a database via stored procedures
Top
Properties
  NameDescription
Public propertyDecryptor
A delegate that can decrypt a string.
(Inherited from DbCommandImageAccessor.)
Public propertyEncryptor
A delegate that can encrypt a string.
(Inherited from DbCommandImageAccessor.)
Public propertyEncryptSerializedState
Whether or not the serialized state is encrypted. Please see documentation of sub-classes to see which members are encrypted.
(Inherited from DbCommandImageAccessor.)
Public propertyExtraParameters
A copy of the extra parameters dictionary. This class does not support changing the parameters after the object has been constructed.
(Inherited from DbCommandImageAccessor.)
Protected propertyGetConnection
A delegate that can return a connection to the database.
(Inherited from DbCommandImageAccessor.)
Public propertyGetFrameCountByIndexProc
The name of the stored procedure that will be used to access the frame count of an image stream. It must take a parameter called index and return a single row dataset with the frame count as the first column. It may also take extra parameters. DbStoredProcImageAccessor(GetConnectionCallback, Boolean, String, String, IDictionary) for an example of a valid stored procedure.
Public propertyGetImageByIndexProc
The name of the stored procedure that will be used to access image streams. It must take a parameter called index and return a single row dataset with the image stream as the first column. It may also take extra parameters.
Public propertyGetImageStreamCountProc
The name of the stored procedure that will be used to access the count of image streams. It must take return a single row dataset with the image stream as the first column. It may also take extra parameters. DbStoredProcImageAccessor(GetConnectionCallback, Boolean, String, String, IDictionary) for an example of a valid stored procedure.
Protected propertyImageFieldName
The name of the image field in the dataset returned by
CreateGetImageRowCommand
. If this method returns null, it is assumed to be in the first column.
(Inherited from DbCommandImageAccessor.)
Top
Methods
  NameDescription
Protected methodAddExtraParameters
Adds any extra parameters supplied by the user that are needed to run the command.
(Inherited from DbCommandImageAccessor.)
Protected methodCreateGetFrameCountCommand
Creates a command that can get the frame count of an image stream.
(Overrides DbCommandImageAccessorCreateGetFrameCountCommand(IDbConnection, Int32).)
Protected methodCreateGetImageRowCommand
Creates a command that can get a single row dataset with the image stream information as the first column. It will pass in a parameter named index with the value of
imageStreamIndex
.
(Overrides DbCommandImageAccessorCreateGetImageRowCommand(IDbConnection, Int32).)
Protected methodCreateGetImageStreamCountCommand
Creates a command that can get the count of image streams.
(Overrides DbCommandImageAccessorCreateGetImageStreamCountCommand(IDbConnection).)
Protected methodCreateGetObjectByIndexCommand
Creates a command that can get an image related database object by calling the stored procedure, passing in the given imageStreamIndex.
Protected methodCreateStoredProcCommand
Creates a command that can call the given stored procedure.
Protected methodCreateStreamFromDatabaseObject
Creates a stream from the object obtained from the database. If the object is a byte array, it is attached to a MemoryStream. If the object is a string, it is interpreted as a filename and an open FileStream to the file is returned. If the object is null or not able to be interpreted as a stream, this method will throw.
(Inherited from DbCommandImageAccessor.)
Protected methodDecryptIfRequested
Decrypt a string if EncryptSerializedState is true.
(Inherited from DbCommandImageAccessor.)
Protected methodEncryptIfRequested
Encrypt a string if EncryptSerializedState is true.
(Inherited from DbCommandImageAccessor.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExtractImageStream
Extracts a stream from a row of the database.
(Inherited from DbCommandImageAccessor.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Protected methodGetDatabaseObject(IDbCommand, Int32)
Gets the database object from the first row of the data set returned by the command from the field at
index
.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDatabaseObject(IDbCommand, String)
Gets the database object from the first row of the data set returned by the command at the field named
field
.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDatabaseObject(IDbCommand, DbCommandImageAccessorFieldGetter, Object)
Gets the database object from the first row of the data set returned by the command from the field at
index
which can be either a field name or an integer index.
(Inherited from DbCommandImageAccessor.)
Protected methodGetDecryptedValue
Gets the value from the serialized data and decrypts it if requested.
(Inherited from DbCommandImageAccessor.)
Protected methodGetFieldByInt
Gets a field from the datareader by passing in the index of a field.
(Inherited from DbCommandImageAccessor.)
Protected methodGetFieldByString
Gets a field from the datareader by passing in the name of the field.
(Inherited from DbCommandImageAccessor.)
Public methodGetFrameCountInImage
The number of frames in the stream indicated by the imageStreamIndex
(Inherited from DbCommandImageAccessor.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImageStreamCount
Gets the number of image streams in this database. Each stream can contain more than one frame.
(Inherited from DbCommandImageAccessor.)
Public methodGetObjectData
Get the data to serialize for this object
(Overrides DbCommandImageAccessorGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOpen
Opens a non-open connection
(Inherited from DbCommandImageAccessor.)
Public methodReset
Reset all caches of information. If you are storing anything that is a cached from the database, release it.
(Inherited from DbCommandImageAccessor.)
Protected methodStoreEncryptedValue
Stores the value into the serialization info and encrypts it if requested.
(Inherited from DbCommandImageAccessor.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also