Property | Type | Description | |
---|---|---|---|
CloseConnections | void | ||
LogResponse | void | ||
LogResponse | void | ||
RaiseAfterSessionEnded | void |
Method | Description | |
---|---|---|
Dispose ( ) : void | ||
GetConnection ( string connectionString, DbConnection>.Func |
Gets or creates a connection that can be used with the current session. If there is no active session, null is returned. This connection can and should be shared across threads for transaction rollbacks to work properly.
|
|
LockConnection ( IDbConnection connection ) : IDisposable |
Because session connections can be shared across threads access to them must be synchronized. For normal connections that are not part of a distributed transaction no locking is performed for better performance.
|
|
NewAsyncActivity ( ) : IAsyncActivity |
Registers an activity with the session. This method only needs to be called on threads that are not tied to an HttpContext.
|
|
NewParallelActivity ( ) : IParallelActivity |
Registers an multithreaded activity with the session that will execute synchronously relative to the current activity already underway. In other words, the parallel activity must complete prior to the current activity completing (unlike NewAsyncActivity).
|
|
PrepareForDispose ( ) : void | ||
ResetServer ( string serviceUrl, ILog log ) : void |
Ensures that there is not an open session. Typically sessions should be ended by calling Dispose() but this can be used at the very start of a test to ensure that the system is in a known state.
|
|
Session ( |
Starts a new Amnesia session with a remote application
|
|
Session ( |
Starts a new Amnesia session with a remote application
|
|
Session ( string appUrl ) : System |
Starts a new Amnesia session with a remote application
|
|
Session ( string appUrl, ILog log ) : System |
Starts a new Amnesia session with a remote application
|
Method | Description | |
---|---|---|
CloseConnections ( ILog log ) : void |
Closes all database connections associated with the session.
|
|
LogResponse ( Handler response ) : void | ||
LogResponse ( Handler response, ILog log ) : void | ||
RaiseAfterSessionEnded ( ) : void |
Called by a single thread when the session has ended
|
public static GetConnection ( string connectionString, DbConnection>.Func |
||
connectionString | string | |
createConnection | DbConnection>.Func | |
return | IDbConnection |
public static LockConnection ( IDbConnection connection ) : IDisposable | ||
connection | IDbConnection | |
return | IDisposable |
public static NewAsyncActivity ( ) : IAsyncActivity | ||
return | IAsyncActivity |
public static NewParallelActivity ( ) : IParallelActivity | ||
return | IParallelActivity |
public static ResetServer ( string serviceUrl, ILog log ) : void | ||
serviceUrl | string | |
log | ILog | |
return | void |
public Session ( |
||
appUrl | ||
log | ILog | |
return | System |
public Session ( string appUrl, ILog log ) : System | ||
appUrl | string | |
log | ILog | |
return | System |