Пример #1
0
    object ICloneable.Clone()
    {
        var connectionString = ConnectionString;
        var connection       = new SafeSqlConnection(connectionString);

        return(connection);
    }
Пример #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlLog"/> class.
        /// </summary>
        /// <param name="connectionString"></param>
        public SqlLog(string connectionString)
        {
            Thread = new WorkerThread(Start)
            {
                Name     = typeof(SqlLog).Name,
                Priority = ThreadPriority.Lowest
            };

            _connection = new SafeSqlConnection(connectionString);
        }
 void ISafeDbConnection.HandleException(Exception exception, IDbCommand command) =>
 SafeSqlConnection.HandleException(exception, command, _cancellationToken);
 void ISafeDbConnection.HandleException(Exception exception, TimeSpan elapsed) =>
 SafeSqlConnection.HandleException(Connection, exception, elapsed, _cancellationToken);