C# 클래스 Castle.ActiveRecord.TransactionScope

Implementation of ISessionScope to provide transaction semantics
상속: SessionScope
파일 보기 프로젝트 열기: nats/castle-1.0.3-mono 1 사용 예제들

공개 메소드들

메소드 설명
FailSession ( ISession session ) : void

This is called when a session has a failure

GetSession ( object key ) : ISession

This method should return the session instance associated with the key.

IsKeyKnown ( object key ) : bool

This method is invoked when the Castle.ActiveRecord.Framework.ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. RegisterSession

RegisterSession ( object key, ISession session ) : void

This method is invoked when no session was available at and the Castle.ActiveRecord.Framework.ISessionFactoryHolder just created one. So it registers the session created within this scope using a key. The scope implementation shouldn't make any assumption on what the key actually is as we reserve the right to change it IsKeyKnown

TransactionScope ( ) : System

Initializes a new instance of the TransactionScope class.

TransactionScope ( OnDispose onDisposeBehavior ) : System

Initializes a new instance of the TransactionScope class.

TransactionScope ( TransactionMode mode ) : System

Initializes a new instance of the TransactionScope class.

TransactionScope ( TransactionMode mode, IsolationLevel isolationLevel, OnDispose onDisposeBehavior ) : System

Initializes a new instance of the TransactionScope class.

TransactionScope ( TransactionMode mode, OnDispose onDisposeBehavior ) : System

Initializes a new instance of the TransactionScope class.

VoteCommit ( ) : void

Votes to commit the transaction

VoteRollBack ( ) : void

Votes to roll back the transaction

보호된 메소드들

메소드 설명
DiscardSessions ( ICollection sessions ) : void

Discards the sessions.

EnsureHasTransaction ( ISession session ) : void

Ensures that a transaction exist, creating one if neccecary

Initialize ( ISession session ) : void

Initializes the current transaction scope using the session

PerformDisposal ( ICollection sessions ) : void

Dispose of this scope

비공개 메소드들

메소드 설명
RaiseOnCompleted ( ) : void

Raises the on completed event

메소드 상세

DiscardSessions() 보호된 메소드

Discards the sessions.
protected DiscardSessions ( ICollection sessions ) : void
sessions ICollection The sessions.
리턴 void

EnsureHasTransaction() 보호된 메소드

Ensures that a transaction exist, creating one if neccecary
protected EnsureHasTransaction ( ISession session ) : void
session ISession The session.
리턴 void

FailSession() 공개 메소드

This is called when a session has a failure
public FailSession ( ISession session ) : void
session ISession the session
리턴 void

GetSession() 공개 메소드

This method should return the session instance associated with the key.
public GetSession ( object key ) : ISession
key object an object instance
리턴 ISession

Initialize() 보호된 메소드

Initializes the current transaction scope using the session
protected Initialize ( ISession session ) : void
session ISession The session.
리턴 void

IsKeyKnown() 공개 메소드

This method is invoked when the Castle.ActiveRecord.Framework.ISessionFactoryHolder instance needs a session instance. Instead of creating one it interrogates the active scope for one. The scope implementation must check if it has a session registered for the given key. RegisterSession
public IsKeyKnown ( object key ) : bool
key object an object instance
리턴 bool

PerformDisposal() 보호된 메소드

Dispose of this scope
protected PerformDisposal ( ICollection sessions ) : void
sessions ICollection The sessions.
리턴 void

RegisterSession() 공개 메소드

This method is invoked when no session was available at and the Castle.ActiveRecord.Framework.ISessionFactoryHolder just created one. So it registers the session created within this scope using a key. The scope implementation shouldn't make any assumption on what the key actually is as we reserve the right to change it IsKeyKnown
public RegisterSession ( object key, ISession session ) : void
key object an object instance
session ISession An instance of ISession
리턴 void

TransactionScope() 공개 메소드

Initializes a new instance of the TransactionScope class.
public TransactionScope ( ) : System
리턴 System

TransactionScope() 공개 메소드

Initializes a new instance of the TransactionScope class.
public TransactionScope ( OnDispose onDisposeBehavior ) : System
onDisposeBehavior OnDispose The on dispose behavior.
리턴 System

TransactionScope() 공개 메소드

Initializes a new instance of the TransactionScope class.
public TransactionScope ( TransactionMode mode ) : System
mode TransactionMode Whatever to create a new transaction or inherits an existing one
리턴 System

TransactionScope() 공개 메소드

Initializes a new instance of the TransactionScope class.
public TransactionScope ( TransactionMode mode, IsolationLevel isolationLevel, OnDispose onDisposeBehavior ) : System
mode TransactionMode Whatever to create a new transaction or inherits an existing one
isolationLevel IsolationLevel The transaction isolation level.
onDisposeBehavior OnDispose The on dispose behavior.
리턴 System

TransactionScope() 공개 메소드

Initializes a new instance of the TransactionScope class.
public TransactionScope ( TransactionMode mode, OnDispose onDisposeBehavior ) : System
mode TransactionMode Whatever to create a new transaction or inherits an existing one
onDisposeBehavior OnDispose The on dispose behavior.
리턴 System

VoteCommit() 공개 메소드

Votes to commit the transaction
public VoteCommit ( ) : void
리턴 void

VoteRollBack() 공개 메소드

Votes to roll back the transaction
public VoteRollBack ( ) : void
리턴 void