DeveelDB  20151217
complete SQL database system, primarly developed for .NET/Mono frameworks
DatabaseExtensions.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace Deveel.Data.Diagnostics {
4  public static class DatabaseExtensions {
5  public static void OnSessionEvent(this IDatabase database, string userName, int commitId, SessionEventType eventType) {
6  database.OnEvent(new SessionEvent(userName, commitId, eventType));
7  }
8 
9  public static void OnSessionBegin(this IDatabase database, string userName, int commitId) {
10  database.OnSessionEvent(userName, commitId, SessionEventType.Begin);
11  }
12 
13  public static void OnSessionCommit(this IDatabase database, string userName, int commitId) {
14  database.OnSessionEvent(userName, commitId, SessionEventType.EndForCommit);
15  }
16 
17  public static void OnSessionRollback(this IDatabase database, string userName, int commitId) {
18  database.OnSessionEvent(userName, commitId, SessionEventType.EndForRollback);
19  }
20  }
21 }
static void OnSessionCommit(this IDatabase database, string userName, int commitId)
static void OnSessionEvent(this IDatabase database, string userName, int commitId, SessionEventType eventType)
The representation of a single database in the system.
Definition: IDatabase.cs:40
static void OnSessionRollback(this IDatabase database, string userName, int commitId)
static void OnSessionBegin(this IDatabase database, string userName, int commitId)