Click or drag to resize
CMSConnectionScope Class
Allows changing command timeout for a code block. Also allows specifying a connection that is used for executing all ConnectionHelper calls that are passed the query text directly within a code block.
Inheritance Hierarchy
SystemObject
  CMS.BaseDisposableObject
    CMS.HelpersTrackableCMSConnectionScope
      CMS.DataEngineCMSConnectionScope

Namespace: CMS.DataEngine
Assembly: CMS.DataEngine (in CMS.DataEngine.dll) Version: 10.0.0
Syntax
C#
public class CMSConnectionScope : Trackable<CMSConnectionScope>, 
	INotCopyThreadItem

The CMSConnectionScope type exposes the following members.

Constructors
  NameDescription
Public methodCMSConnectionScope(Boolean)
Empty constructor. Creates a new connection and ensures that all database connections during the live of this object will use that connection.
Public methodCMSConnectionScope(IDataConnection)
Constructor. Ensures that all database connections during the live of this object will use the given connection.
Public methodCMSConnectionScope(Boolean, Boolean) Obsolete.
Empty constructor. Creates a new connection and ensures that all database connections during the live of this object will use that connection.
Public methodCMSConnectionScope(String, Boolean)
Constructor. Ensures that all database connections during the live of this object will use the given connection.
Public methodCMSConnectionScope(IDataConnection, Boolean) Obsolete.
Constructor. Ensures that all database connections during the live of this object will use the given connection.
Public methodCMSConnectionScope(String, Boolean, Boolean) Obsolete.
Constructor. Ensures that all database connections during the live of this object will use the given connection.
Top
Properties
  NameDescription
Public propertyCommandTimeout
Command timeout which will be set on the connection within the current connection scope.
Public propertyConnection
Connection of the current scope.
Public propertyConnectionString
Connection string name that the thread should use to access the database
Public propertyDisableConnectionDebug
If true, the debug is disabled on this connection
Public propertyDisableDebug
If true, the debug of queries is disabled on this connection
Public propertyDisableQueryDebug
If true, the debug of queries is disabled on this connection
Top
Methods
  NameDescription
Public methodCallOnDispose
Adds the given action to the list of actions called when the handler object is disposed
(Inherited from DisposableObject.)
Public methodClose
Closes the connection.
Public methodDispose
Disposes the object.
(Overrides DisposableObjectDispose.)
Public methodLock
Locks the event on the given lock object. The context stays locked until the handler is disposed.
(Inherited from DisposableObject.)
Public methodOpen
Opens the connection.
Public methodResetConnection
Resets the connection to recover from error.
Public methodUsing
Adds the given object to the list of the allocated objects to dispose
(Inherited from DisposableObject.)
Top
Remarks
To set the connection scope for the whole API (e.g. DataQuery), use the CMSConnectionContext class.
See Also