C# Class PetShop.Services.ConnectionScope

Inheritance: ConnectionScopeBase, IDisposable
Mostra file Open project: netTiers/netTiers Class Usage Examples

Public Methods

Method Description
Complete ( ) : bool

Completes this transaction.

CreateTransaction ( ) : TransactionManager

Creates a new transaction on the current ConnectionScope.

CreateTransaction ( IsolationLevel level ) : TransactionManager

Creates a new transaction on the current ConnectionScope with the specified System.Data.IsolationLevel.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

EnqueueOnThreadPool ( ParameterizedThreadStart start, object state ) : bool

Queues a method for execution. The method executes when a thread pool thread becomes available.

EnqueueOnThreadPool ( ThreadStart start ) : bool

Queues a method for execution. The method executes when a thread pool thread becomes available.

NewThread ( ParameterizedThreadStart start ) : Thread

Creates a new Thread object and copies the current ConnectionScope parameters.

NewThread ( ThreadStart start ) : Thread

Creates a new Thread object and copies the current ConnectionScope parameters.

ValidateOrCreateTransaction ( ) : TransactionManager

Validates an existing TransactionManager if one exists, otherwise creates a new TransactionManager to use.

ValidateOrCreateTransaction ( bool createTransaction ) : TransactionManager

Validates an existing TransactionManager if one exists, otherwise creates a new TransactionManager to use.

Private Methods

Method Description
ConnectionScope ( ) : System

Private constructor.

Copy ( ConnectionScope scope ) : void

Copies the values from the specified scope object to the ConnectionScope used by the current thread.

Method Details

Complete() public static method

Completes this transaction.
public static Complete ( ) : bool
return bool

CreateTransaction() public static method

Creates a new transaction on the current ConnectionScope.
public static CreateTransaction ( ) : TransactionManager
return PetShop.Data.TransactionManager

CreateTransaction() public static method

Creates a new transaction on the current ConnectionScope with the specified System.Data.IsolationLevel.
public static CreateTransaction ( IsolationLevel level ) : TransactionManager
level IsolationLevel Determines which to use for the transaction.
return PetShop.Data.TransactionManager

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public Dispose ( ) : void
return void

EnqueueOnThreadPool() public static method

Queues a method for execution. The method executes when a thread pool thread becomes available.
public static EnqueueOnThreadPool ( ParameterizedThreadStart start, object state ) : bool
start ParameterizedThreadStart A delegate specifying which method to run /// when the is started.
state object An object containing data to be used by the method.
return bool

EnqueueOnThreadPool() public static method

Queues a method for execution. The method executes when a thread pool thread becomes available.
public static EnqueueOnThreadPool ( ThreadStart start ) : bool
start ThreadStart A delegate specifying which method to run /// when the is started.
return bool

NewThread() public static method

Creates a new Thread object and copies the current ConnectionScope parameters.
public static NewThread ( ParameterizedThreadStart start ) : Thread
start ParameterizedThreadStart A delegate specifying which method to run /// when the is started.
return Thread

NewThread() public static method

Creates a new Thread object and copies the current ConnectionScope parameters.
public static NewThread ( ThreadStart start ) : Thread
start ThreadStart A delegate specifying which method to run /// when the is started.
return Thread

ValidateOrCreateTransaction() public static method

Validates an existing TransactionManager if one exists, otherwise creates a new TransactionManager to use.
public static ValidateOrCreateTransaction ( ) : TransactionManager
return PetShop.Data.TransactionManager

ValidateOrCreateTransaction() public static method

Validates an existing TransactionManager if one exists, otherwise creates a new TransactionManager to use.
public static ValidateOrCreateTransaction ( bool createTransaction ) : TransactionManager
createTransaction bool determines whether to create a new transaction
return PetShop.Data.TransactionManager