public MyCatCommand(string commandText, MyCatConnection connection, MyCatTransaction transaction) { CommandText = commandText; DbConnection = connection; DbTransaction = transaction; m_parameterCollection = new MyCatParameterCollection(); CommandType = CommandType.Text; }
private static async Task ClearPoolAsync(MyCatConnection connection, IOBehavior ioBehavior, CancellationToken cancellationToken) { if (connection == null) { throw new ArgumentNullException(nameof(connection)); } var pool = ConnectionPool.GetPool(connection.m_connectionSettings); if (pool != null) { await pool.ClearAsync(ioBehavior, cancellationToken).ConfigureAwait(false); } }
internal MyCatTransaction(MyCatConnection connection, IsolationLevel isolationLevel) { m_connection = connection; IsolationLevel = isolationLevel; }
public static void ClearConnectionPools() => MyCatConnection.ClearAllPools();
public MyCatCommand(string commandText, MyCatConnection connection) : this(commandText, connection, null) { }
public MyCatCommand(MyCatConnection connection, MyCatTransaction transaction) : this(null, connection, transaction) { }
public static Task ClearPoolAsync(MyCatConnection connection, CancellationToken cancellationToken) => ClearPoolAsync(connection, connection.AsyncIOBehavior, cancellationToken);
public static void ClearPool(MyCatConnection connection) => ClearPoolAsync(connection, IOBehavior.Synchronous, CancellationToken.None).GetAwaiter().GetResult();