Click or drag to resize
Config Class

A Config instance is created at the beginning of the handling of a request by the engine and transports the request data across layers.

It has the following features:

    Inheritance Hierarchy

    Namespace: Activsoft.Engine
    Assembly: Activsoft.Engine (in Activsoft.Engine.dll) Version: 6.0.0.0
    Syntax
    public class Config : XsltArgumentList, IExtractor, 
    	IEnumerable, IDatabaseAbstracter, IDisposable

    The Config type exposes the following members.

    Constructors
      NameDescription
    Public methodConfig
    Initializes a new instance of the Config class
    Public methodConfig(String)
    Initializes a new instance of the Config class using the given section name to create an inner IDatabaseAbstracter.
    Public methodConfig(Config)
    Initializes a new instance of the Config class by cloning an existing instance.
    Top
    Methods
      NameDescription
    Public methodAddExtensionObject
    Adds a new object to the XsltArgumentList and associates it with the namespace URI.
    (Inherited from XsltArgumentList.)
    Public methodAddParam
    Adds a parameter to the XsltArgumentList and associates it with the namespace qualified name.
    (Inherited from XsltArgumentList.)
    Public methodBeginTransaction
    Puts the abstracter in transaction mode using the Read Committed isolation level. From this point, and until a call to Commit or Rollback, all SQL requests will be executed on the same connection and transaction.
    Public methodBeginTransaction(IsolationLevel)
    Puts the abstracter in transaction mode using the given isolation level. From this point, and until a call to Commit or Rollback, all SQL requests will be executed on the same connection and transaction.
    Public methodClear
    Removes all parameters and extension objects from the XsltArgumentList.
    (Inherited from XsltArgumentList.)
    Public methodCloseCommand
    Closes a IDbCommand and if the abstracter is not in transaction mode, its underlying connection.
    Public methodCloseReader
    Closes a IDataReader and if the abstracter is not in transaction mode, its underlying connection.
    Public methodCommit
    If the abstracter is in transaction mode, commits the transaction, closes the connection, and exits the transaction mode. If the abstracter is not in transaction mode, does nothing.
    Public methodCreateAndAddParameter(IDbCommand, DbType, String, Object)
    Creates a SQL parameter and attaches it to the given IDbCommand.
    Public methodCreateAndAddParameter(IDbCommand, DbType, String, ParameterDirection, Object)
    Creates a SQL parameter and attaches it to the given IDbCommand.
    Public methodCreateAndAddParameter(IDbCommand, DbType, String, Int32, Object)
    Creates a SQL parameter and attaches it to the given IDbCommand.
    Public methodCreateAndAddParameter(IDbCommand, DbType, String, Int32, ParameterDirection, Object)
    Creates a SQL parameter and attaches it to the given IDbCommand.
    Public methodCreateSqlStatement
    Creates a SqlStatement customized for the target database.
    Public methodDebugXml
    Writes the current XML document to the given TextWriter.
    Public methodDispose
    Clears the unmanaged resources hold by this instance.
    Public methodEndDocument
    Closes the XML document and fills the Data property.
    Public methodEquals
    Determines whether the specified Object is equal to the current Object.
    (Inherited from Object.)
    Public methodError(String)
    Adds an error.
    Public methodError(String, String)
    Adds an error.
    Public methodExecuteNonQuery(IDbCommand)
    Executes a IDbCommand not returning data (basically, anything but a SELECT, although postgresql, for example, can return data from INSERT / UPDATE / DELETE statements).
    Public methodExecuteNonQuery(String)
    Executes a SQL request not returning data (basically, anything but a SELECT, although postgresql, for example, can return data from INSERT / UPDATE / DELETE statements).
    Public methodExecuteNonQuery(Config, SqlStatement)
    Executes a SqlStatement not returning data (basically, anything but a SELECT, although postgresql, for example, can return data from INSERT / UPDATE / DELETE statements). Exclusion zones that end up being excluded are replaced by an empty string.
    Public methodExecuteNonQuery(SqlStatement, String)
    Executes a SqlStatement not returning data (basically, anything but a SELECT). Exclusion zones that end up being excluded are replaced by replaceEmptyZone. Since no Config object is passed to the method, the parameters values are not modified.
    Public methodExecuteNonQuery(Config, SqlStatement, String)
    Executes a SqlStatement not returning data (basically, anything but a SELECT, although postgresql, for example, can return data from INSERT / UPDATE / DELETE statements). Parameter values are read from the Config object. Exclusion zones that end up being excluded are replaced by replaceEmptyZone.
    Public methodExecuteReader(IDbCommand)
    Executes a IDbCommand returning data.
    Public methodExecuteReader(String)
    Executes a SQL request returning data.
    Public methodExecuteReader(Config, SqlStatement)
    Executes a SqlStatement returning data. Exclusion zones that end up being excluded are replaced by an empty string.
    Public methodExecuteReader(Config, SqlStatement, String)
    Executes a SqlStatement returning data. Parameter values are read from the Config object. Exclusion zones that end up being excluded are replaced by replaceEmptyZone.
    Public methodExplainException
    Database errors are not consistent across providers; error codes and error messages are always provider dependent. This method extracts the the error code number and message from the given DbException.
    Public methodExtract
    Extracts the parameters in the XML document.
    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.)
    Public methodGetCommand
    Creates a IDbCommand on the current connection.
    Public methodGetCommand(Boolean)
    Creates a new IDbCommand and attaches it to a database connection. If the abstracter is in transaction mode, and openConnection is false, the connection used is the transaction connection. Else, a new connection is used.
    Public methodGetEnumerator
    Returns an enumerator to traverse the parameter names as String instances.
    Public methodGetExtensionObject
    Gets the object associated with the given namespace.
    (Inherited from XsltArgumentList.)
    Public methodGetHashCode
    Serves as a hash function for a particular type.
    (Inherited from Object.)
    Public methodGetParam
    Gets the parameter associated with the namespace qualified name.
    (Inherited from XsltArgumentList.)
    Public methodStatic memberGetPath
    Transform a relativePath into an absolute one according to the ConfigLoaderConfigurationSection.
    Public methodGetTransform
    Creates the XslCompiledTransform for the current XslFile using the current TransformGenerator.
    Public methodGetType
    Gets the type of the current instance.
    (Inherited from Object.)
    Public methodStatic memberGetWebRootPath
    Gets the root of the current web application, if the engine is used in a web context.
    Protected methodMemberwiseClone
    Creates a shallow copy of the current Object.
    (Inherited from Object.)
    Public methodStatic memberOpenFile
    Opens a file by transforming a relativePath into an absolute one according to the ConfigLoaderConfigurationSection.
    Public methodParse(String, String, Int32)
    Parses a list of SqlStatement from a semicolon separated string, a prefix and a starting number for the numeric parameters (see the format description). It uses the default formatters and transformers.
    Public methodParse(String, String, Int32, DictionaryString, IFormatterFactory)
    Parses a list of SqlStatement from a semicolon separated string, a prefix and a starting number for the numeric parameters (see the format description) and a custom list of formatters. It uses the default transformers.
    Public methodParse(String, String, Int32, DictionaryString, IFormatterFactory, DictionaryString, KeyValuePairSqlType, IFormatterFactory)
    Parses a list of SqlStatement from a semicolon separated string, a prefix and a starting number for the numeric parameters (see the format description) and a custom list of formatters. It uses the default transformers.
    Public methodRemoveExtensionObject
    Removes the object with the namespace URI from the XsltArgumentList.
    (Inherited from XsltArgumentList.)
    Public methodRemoveParam
    Removes the parameter from the XsltArgumentList.
    (Inherited from XsltArgumentList.)
    Public methodRender(Stream, XslCompiledTransform)
    Closes the XML document, and transforms it with the current xslt stylesheet into a Stream.
    Public methodRender(TextWriter, XslCompiledTransform)
    Closes the XML document, and transforms it with the current xslt stylesheet into a TextWriter.
    Public methodRender(XmlWriter, XslCompiledTransform)
    Closes the XML document, and transforms it with the current xslt stylesheet into an XmlWriter.
    Public methodResetDocument

    Clears the XML document and creates a new one.

    This method is mostly used in an IAction or in a windows application to render content (for example, create a PDF document or the HTML content of an email) and then clear the Config object to do another rendering.

    Public methodRollback
    If the abstracter is in transaction mode, rolls back the transaction, closes the connection, and exits the transaction mode. If the abstracter is not in transaction mode, does nothing.
    Public methodToString
    Returns a string that represents the current object.
    (Inherited from Object.)
    Top
    Fields
      NameDescription
    Protected fieldStatic memberMethods
    Top
    Properties
      NameDescription
    Public propertyAbstracter
    Gets or sets the inner IDatabaseAbstracter.
    Public propertyCommandTimeout
    Gets or sets the default command time out.
    Public propertyConnectionString
    Gets or sets the connection string used by this abstracter. By default, the connection string is created by the configuration system, but you can force a custom connection string using this property.
    Public propertyContext
    Stores objects created at one point during the request processing that can be used later (session manager, etc.).
    Public propertyStatic memberCurrent
    Returns the current Config instance, according to the ConfigLoaderConfigurationSection.
    Public propertyData
    Gets the XML document content. It is available only after EndDocument has been called.
    Public propertyErrors
    The error dictionary.
    Public propertyHasActed
    Whether any IAction has said it has done something.
    Public propertyItemString
    Gets the parameter with the specified name.
    Public propertyItemString, Method
    Gets the parameter with the specified name and method.
    Public propertyMode
    Gets or sets the rendering mode.
    Public propertyMustWriteBodyInput
    Gets or sets a value indicating whether the engine must open the BODY tag when beginning the XML document. Default: true.
    Public propertyMustWriteBodyOutput
    Used onyl in web services mode. Gets or sets a value indicating whether the engine must open the BODY tag when writing the XML document directly in the output. Default: false.
    Public propertyOutputDocument
    Gets an XmlWriter to write to the XML document. You must use this property when you implement IExtractor to write into the XML document.
    Public propertySessionManager
    Gets or sets the session manager. When a session manager is set, its RetrieveSession method is called.
    Public propertyTransformGenerator
    Gets or sets the IXslTransformGenerator that will be used to load the xslt stylesheet.
    Public propertyType
    A string describing the underlying database.
    Public propertyXslFile
    Gets or sets the XSL file path. The TransformGenerator is not used at this stage.
    Public propertyXslPath
    Gets or sets the XSL file root directory path. When the path is set, it is rooted by GetPath(String).
    Top
    Events
      NameDescription
    Public eventXsltMessageEncountered
    Occurs when a message is specified in the style sheet by the xsl:message element.
    (Inherited from XsltArgumentList.)
    Top
    See Also