Datei: NDODLL/INDOTransactionScope.cs
Last Commit (e34b4f0)
| 1 | using System; |
| 2 | using System.Data; |
| 3 | |
| 4 | namespace NDO |
| 5 | { |
| 6 | ····/// <summary> |
| 7 | ····/// Interface for differerent implementations of NDOTransactionScope |
| 8 | ····/// </summary> |
| 9 | ····public interface INDOTransactionScope : IDisposable |
| 10 | ····{ |
| 11 | ········/// <summary> |
| 12 | ········/// This is called from NDO to provide the current pm to the transaction scope. |
| 13 | ········/// </summary> |
| 14 | ········/// <param name="pm"></param> |
| 15 | ········/// <returns></returns> |
| 16 | ········INDOTransactionScope Initialize( PersistenceManager pm ); |
| 17 | ········/// <summary> |
| 18 | ········/// Sets the IsolationLevel of transactions started by the scope object |
| 19 | ········/// </summary> |
| 20 | ········IsolationLevel IsolationLevel { get; set; } |
| 21 | |
| 22 | ········/// <summary> |
| 23 | ········/// Sets the Transaction Mode in which the PersistenceManager should run. |
| 24 | ········/// </summary> |
| 25 | ········TransactionMode TransactionMode { get; set; } |
| 26 | |
| 27 | ········/// <summary> |
| 28 | ········/// Starts a transaction, if necessary |
| 29 | ········/// </summary> |
| 30 | ········void CheckTransaction(); |
| 31 | |
| 32 | ········/// <summary> |
| 33 | ········/// Commits a transaction, if necessary |
| 34 | ········/// </summary> |
| 35 | ········void Complete(); |
| 36 | |
| 37 | ········/// <summary> |
| 38 | ········/// Gets a connection from the cache, or creates one using the factory and puts it on the cache. |
| 39 | ········/// </summary> |
| 40 | /// <param name="id">Connection id of the NDO. Mapping. Connection object for which the IDbConnection is created. </param> |
| 41 | ········/// <param name="factory">A lambda expression, which can create an IDbConnection object.</param> |
| 42 | ········/// <returns></returns> |
| 43 | IDbConnection GetConnection( string id, Func<IDbConnection> factory ) ; |
| 44 | |
| 45 | ········/// <summary> |
| 46 | ········/// Gets a transaction, if one exists for the given connection id. |
| 47 | ········/// </summary> |
| 48 | ········/// <param name="id"></param> |
| 49 | ········/// <returns></returns> |
| 50 | ········IDbTransaction GetTransaction( string id ); |
| 51 | ····} |
| 52 | } |
New Commit (14cacf2)
| 1 | using NDO.Mapping; |
| 2 | using System; |
| 3 | using System.Data; |
| 4 | |
| 5 | namespace NDO |
| 6 | { |
| 7 | ····/// <summary> |
| 8 | ····/// Interface for differerent implementations of NDOTransactionScope |
| 9 | ····/// </summary> |
| 10 | ····public interface INDOTransactionScope : IDisposable |
| 11 | ····{ |
| 12 | ········/// <summary> |
| 13 | ········/// This is called from NDO to provide the current pm to the transaction scope. |
| 14 | ········/// </summary> |
| 15 | ········/// <param name="pm"></param> |
| 16 | ········/// <returns></returns> |
| 17 | ········INDOTransactionScope Initialize( PersistenceManager pm ); |
| 18 | ········/// <summary> |
| 19 | ········/// Sets the IsolationLevel of transactions started by the scope object |
| 20 | ········/// </summary> |
| 21 | ········IsolationLevel IsolationLevel { get; set; } |
| 22 | |
| 23 | ········/// <summary> |
| 24 | ········/// Sets the Transaction Mode in which the PersistenceManager should run. |
| 25 | ········/// </summary> |
| 26 | ········TransactionMode TransactionMode { get; set; } |
| 27 | |
| 28 | ········/// <summary> |
| 29 | ········/// Starts a transaction, if necessary |
| 30 | ········/// </summary> |
| 31 | ········void CheckTransaction(); |
| 32 | |
| 33 | ········/// <summary> |
| 34 | ········/// Commits a transaction, if necessary |
| 35 | ········/// </summary> |
| 36 | ········void Complete(); |
| 37 | |
| 38 | ········/// <summary> |
| 39 | ········/// Gets a connection from the cache, or creates one using the factory and puts it on the cache. |
| 40 | ········/// </summary> |
| 41 | /// <param name="ndoConnection">The NDO. Mapping. Connection object for which the IDbConnection is created. </param> |
| 42 | ········/// <param name="factory">A lambda expression, which can create an IDbConnection object.</param> |
| 43 | ········/// <returns></returns> |
| 44 | IDbConnection GetConnection( Connection ndoConnection, Func<IDbConnection> factory ) ; |
| 45 | |
| 46 | ········/// <summary> |
| 47 | ········/// Gets a transaction, if one exists for the given connection id. |
| 48 | ········/// </summary> |
| 49 | ········/// <param name="id"></param> |
| 50 | ········/// <returns></returns> |
| 51 | ········IDbTransaction GetTransaction( string id ); |
| 52 | ····} |
| 53 | } |