Design Pattern Framework 3.5
TransactionDecorator Class
Patterns-In-Action! Application ► Transactions ► TransactionDecorator
TransactionDecorator wraps (decorates) the built-in TransactionScope class
and simply filters out the Microsoft Access transactions (the Jet engine
provider does not support 'local transactions'). Microsoft Access transactions
are therefore handled in simple autocommit mode. Additional database vendors
can be handled accordingly.
Declaration Syntax
C# | Visual Basic |
public sealed class TransactionDecorator : IDisposable
Public NotInheritable Class TransactionDecorator _ Implements IDisposable
Members
All Members | Constructors | Methods | |||
|
|
|
Icon | Member | Description |
---|---|---|
TransactionDecorator()()() |
Initializes a new instance of TransactionDecorator.
Sets up the internal transaction scope variable.
|
|
TransactionDecorator(Transaction) |
Initializes a new instance of the TransactionScope class and sets the
specified transaction as the ambient transaction, so that transactional
work done inside the scope uses this transDoFactory.
|
|
TransactionDecorator(TransactionScopeOption) |
Initializes a new instance of the TransactionScope class with the specified requirements.
|
|
TransactionDecorator(Transaction, TimeSpan) |
Initializes a new instance of the TransactionScope class
with the specified timeout value, and sets the specified
transaction as the ambient transaction, so that transactional
work done inside the scope uses this transDoFactory.
|
|
TransactionDecorator(TransactionScopeOption, TimeSpan) |
Initializes a new instance of the TransactionScope class
with the specified timeout value and requirements.
|
|
TransactionDecorator(TransactionScopeOption, TransactionOptions) |
Initializes a new instance of the TransactionScope class with the specified requirements.
|
|
TransactionDecorator(Transaction, TimeSpan, EnterpriseServicesInteropOption) |
Initializes a new instance of the TransactionScope class with the specified
timeout value and COM+ interoperability requirements, and sets the specified
transaction as the ambient transaction, so that transactional work done inside
the scope uses this transDoFactory.
|
|
TransactionDecorator(TransactionScopeOption, TransactionOptions, EnterpriseServicesInteropOption) |
Initializes a new instance of the TransactionScope class with the
specified scope and COM+ interoperability requirements, and
transaction options.
|
|
Complete()()() |
Indicates that all operations within the scope are completed succesfully.
|
|
Dispose()()() |
Ends and disposes the transaction scope.
|
|
Equals(Object) | (Inherited from Object.) |
|
Finalize()()() |
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.) |
|
GetHashCode()()() |
Serves as a hash function for a particular type.
(Inherited from Object.) |
|
GetType()()() |
Gets the Type of the current instance.
(Inherited from Object.) |
|
MemberwiseClone()()() |
Creates a shallow copy of the current Object.
(Inherited from Object.) |
|
ToString()()() | (Inherited from Object.) |
Remarks
GoF Design Pattern: Decorator.
The Decorator Design Pattern is usually associated with additional functionality.
In this simple decorator the additional functionality is that is simply filters
for a particular database.
Inheritance Hierarchy
Object | |
TransactionDecorator |