Exemple #1
0
 public MyCatCommand(string commandText, MyCatConnection connection, MyCatTransaction transaction)
 {
     CommandText           = commandText;
     DbConnection          = connection;
     DbTransaction         = transaction;
     m_parameterCollection = new MyCatParameterCollection();
     CommandType           = CommandType.Text;
 }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
 internal MyCatTransaction(MyCatConnection connection, IsolationLevel isolationLevel)
 {
     m_connection   = connection;
     IsolationLevel = isolationLevel;
 }
Exemple #4
0
 public static void ClearConnectionPools() => MyCatConnection.ClearAllPools();
Exemple #5
0
 public MyCatCommand(string commandText, MyCatConnection connection)
     : this(commandText, connection, null)
 {
 }
Exemple #6
0
 public MyCatCommand(MyCatConnection connection, MyCatTransaction transaction)
     : this(null, connection, transaction)
 {
 }
Exemple #7
0
 public static Task ClearPoolAsync(MyCatConnection connection, CancellationToken cancellationToken) => ClearPoolAsync(connection, connection.AsyncIOBehavior, cancellationToken);
Exemple #8
0
 public static void ClearPool(MyCatConnection connection) => ClearPoolAsync(connection, IOBehavior.Synchronous, CancellationToken.None).GetAwaiter().GetResult();