Last change
on this file since 907 was 815, checked in by Sam Habiel, 14 years ago |
Initial commit of C# Source Code. Now to try to get it to compile.
|
File size:
1.3 KB
|
Rev | Line | |
---|
[815] | 1 | using System;
|
---|
| 2 | using System.Data;
|
---|
| 3 |
|
---|
| 4 | namespace IndianHealthService.BMXNet
|
---|
| 5 | {
|
---|
| 6 | public class BMXNetTransaction : IDbTransaction
|
---|
| 7 | {
|
---|
| 8 | public IsolationLevel IsolationLevel
|
---|
| 9 | {
|
---|
| 10 | /*
|
---|
| 11 | * Should return the current transaction isolation
|
---|
| 12 | * level. For the BMXNet, assume the default
|
---|
| 13 | * which is ReadCommitted.
|
---|
| 14 | */
|
---|
| 15 | get { return IsolationLevel.ReadCommitted; }
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | public void Commit()
|
---|
| 19 | {
|
---|
| 20 | /*
|
---|
| 21 | * Implement Commit here. Although the BMXNet does
|
---|
| 22 | * not provide an implementation, it should never be
|
---|
| 23 | * a no-op because data corruption could result.
|
---|
| 24 | */
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 | public void Rollback()
|
---|
| 28 | {
|
---|
| 29 | /*
|
---|
| 30 | * Implement Rollback here. Although the BMXNet does
|
---|
| 31 | * not provide an implementation, it should never be
|
---|
| 32 | * a no-op because data corruption could result.
|
---|
| 33 | */
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | public IDbConnection Connection
|
---|
| 37 | {
|
---|
| 38 | /*
|
---|
| 39 | * Return the connection for the current transaction.
|
---|
| 40 | */
|
---|
| 41 |
|
---|
| 42 | get { return this.Connection; }
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | public void Dispose()
|
---|
| 46 | {
|
---|
| 47 | this.Dispose(true);
|
---|
| 48 | System.GC.SuppressFinalize(this);
|
---|
| 49 | }
|
---|
| 50 |
|
---|
| 51 | private void Dispose(bool disposing)
|
---|
| 52 | {
|
---|
| 53 | if (disposing)
|
---|
| 54 | {
|
---|
| 55 | if (null != this.Connection)
|
---|
| 56 | {
|
---|
| 57 | // implicitly rollback if transaction still valid
|
---|
| 58 | this.Rollback();
|
---|
| 59 | }
|
---|
| 60 | }
|
---|
| 61 | }
|
---|
| 62 |
|
---|
| 63 | }
|
---|
| 64 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.