init
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace SDA.DataProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Diagnosztikai célokat szolgál.
|
||||
/// </summary>
|
||||
public static class SDAConnectionDiagnostics
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static bool DiagnosticEnable { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="SDACommand"/> végrehajtása után kiváltodó esemény />
|
||||
/// </summary>
|
||||
public static event EventHandler<CommandExecutedEventArgs> CommandExecuted;
|
||||
|
||||
internal static void RaiseCommandExecutedEvent(object sender, CommandExecutedEventArgs transactionEventArgs)
|
||||
{
|
||||
CommandExecuted?.Invoke(sender, transactionEventArgs);
|
||||
}
|
||||
|
||||
static volatile int _activeConnections;
|
||||
|
||||
internal static void IncrementActiveConnections()
|
||||
{
|
||||
_activeConnections++;
|
||||
}
|
||||
|
||||
internal static void DecrementActiveConnections()
|
||||
{
|
||||
_activeConnections--;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A jelenleg megnyitott, de még nem eldobott adatbázis-kapcsolatok számát adja meg.
|
||||
/// </summary>
|
||||
public static int ActiveConnections => _activeConnections;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user