| 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:
Namespace: Activsoft.Engine
The Config type exposes the following members.
| Name | Description | |
|---|---|---|
| Config | Initializes a new instance of the Config class | |
| Config(String) |
Initializes a new instance of the Config class using the given section name to create an inner IDatabaseAbstracter.
| |
| Config(Config) |
Initializes a new instance of the Config class by cloning an existing instance.
|
| Name | Description | |
|---|---|---|
| AddExtensionObject | Adds a new object to the XsltArgumentList and associates it with the namespace URI. (Inherited from XsltArgumentList.) | |
| AddParam | Adds a parameter to the XsltArgumentList and associates it with the namespace qualified name. (Inherited from XsltArgumentList.) | |
| BeginTransaction | ||
| BeginTransaction(IsolationLevel) | ||
| Clear | Removes all parameters and extension objects from the XsltArgumentList. (Inherited from XsltArgumentList.) | |
| CloseCommand |
Closes a IDbCommand and if the abstracter is not in transaction mode, its underlying connection.
| |
| CloseReader |
Closes a IDataReader and if the abstracter is not in transaction mode, its underlying connection.
| |
| Commit |
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.
| |
| CreateAndAddParameter(IDbCommand, DbType, String, Object) |
Creates a SQL parameter and attaches it to the given IDbCommand.
| |
| CreateAndAddParameter(IDbCommand, DbType, String, ParameterDirection, Object) |
Creates a SQL parameter and attaches it to the given IDbCommand.
| |
| CreateAndAddParameter(IDbCommand, DbType, String, Int32, Object) |
Creates a SQL parameter and attaches it to the given IDbCommand.
| |
| CreateAndAddParameter(IDbCommand, DbType, String, Int32, ParameterDirection, Object) |
Creates a SQL parameter and attaches it to the given IDbCommand.
| |
| CreateSqlStatement |
Creates a SqlStatement customized for the target database.
| |
| DebugXml |
Writes the current XML document to the given TextWriter.
| |
| Dispose |
Clears the unmanaged resources hold by this instance.
| |
| EndDocument |
Closes the XML document and fills the Data property.
| |
| Equals | (Inherited from Object.) | |
| Error(String) |
Adds an error.
| |
| Error(String, String) |
Adds an error.
| |
| ExecuteNonQuery(IDbCommand) |
Executes a IDbCommand not returning data (basically, anything but a SELECT, although postgresql, for example, can return data from INSERT / UPDATE / DELETE statements).
| |
| ExecuteNonQuery(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).
| |
| ExecuteNonQuery(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.
| |
| ExecuteNonQuery(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.
| |
| ExecuteNonQuery(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.
| |
| ExecuteReader(IDbCommand) |
Executes a IDbCommand returning data.
| |
| ExecuteReader(String) |
Executes a SQL request returning data.
| |
| ExecuteReader(Config, SqlStatement) |
Executes a SqlStatement returning data.
Exclusion zones that end up being excluded are replaced by an empty string.
| |
| ExecuteReader(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.
| |
| ExplainException |
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.
| |
| Extract |
Extracts the parameters in the XML document.
| |
| Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
| GetCommand |
Creates a IDbCommand on the current connection.
| |
| GetCommand(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.
| |
| GetEnumerator |
Returns an enumerator to traverse the parameter names as String instances.
| |
| GetExtensionObject | Gets the object associated with the given namespace. (Inherited from XsltArgumentList.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetParam | Gets the parameter associated with the namespace qualified name. (Inherited from XsltArgumentList.) | |
| GetPath |
Transform a relativePath into an absolute one according to the ConfigLoaderConfigurationSection.
| |
| GetTransform |
Creates the XslCompiledTransform for the current XslFile using the current TransformGenerator.
| |
| GetType | Gets the type of the current instance. (Inherited from Object.) | |
| GetWebRootPath |
Gets the root of the current web application, if the engine is used in a web context.
| |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| OpenFile |
Opens a file by transforming a relativePath into an absolute one according to the ConfigLoaderConfigurationSection.
| |
| Parse(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.
| |
| Parse(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.
| |
| Parse(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.
| |
| RemoveExtensionObject | Removes the object with the namespace URI from the XsltArgumentList. (Inherited from XsltArgumentList.) | |
| RemoveParam | Removes the parameter from the XsltArgumentList. (Inherited from XsltArgumentList.) | |
| Render(Stream, XslCompiledTransform) |
Closes the XML document, and transforms it with the current xslt stylesheet into a Stream.
| |
| Render(TextWriter, XslCompiledTransform) |
Closes the XML document, and transforms it with the current xslt stylesheet into a TextWriter.
| |
| Render(XmlWriter, XslCompiledTransform) |
Closes the XML document, and transforms it with the current xslt stylesheet into an XmlWriter.
| |
| ResetDocument | 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. | |
| Rollback |
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.
| |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| Abstracter |
Gets or sets the inner IDatabaseAbstracter.
| |
| CommandTimeout |
Gets or sets the default command time out.
| |
| ConnectionString |
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.
| |
| Context |
Stores objects created at one point during the request processing that can be used later (session manager, etc.).
| |
| Current |
Returns the current Config instance, according to the ConfigLoaderConfigurationSection.
| |
| Data |
Gets the XML document content. It is available only after EndDocument has been called.
| |
| Errors |
The error dictionary.
| |
| HasActed |
Whether any IAction has said it has done something.
| |
| ItemString |
Gets the parameter with the specified name.
| |
| ItemString, Method |
Gets the parameter with the specified name and method.
| |
| Mode |
Gets or sets the rendering mode.
| |
| MustWriteBodyInput |
Gets or sets a value indicating whether the engine must open the BODY tag when beginning the XML document. Default: true.
| |
| MustWriteBodyOutput |
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.
| |
| OutputDocument |
Gets an XmlWriter to write to the XML document. You must use this property when you implement IExtractor to write into the XML document.
| |
| SessionManager |
Gets or sets the session manager. When a session manager is set, its RetrieveSession method is called.
| |
| TransformGenerator |
Gets or sets the IXslTransformGenerator that will be used to load the xslt stylesheet.
| |
| Type |
A string describing the underlying database.
| |
| XslFile |
Gets or sets the XSL file path. The TransformGenerator is not used at this stage.
| |
| XslPath |
Gets or sets the XSL file root directory path. When the path is set, it is rooted by GetPath(String).
|
| Name | Description | |
|---|---|---|
| XsltMessageEncountered | Occurs when a message is specified in the style sheet by the xsl:message element. (Inherited from XsltArgumentList.) |