/// <summary>
        /// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
        /// </summary>        
        public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
        {
            _displayCount = Math.Min(settings.Size, MaximumDisplayCount);

            if (settings.ConnectionString.IsNullOrEmpty()) throw new ArgumentOutOfRangeException("settings", "Connection string must be specified when using a SQL error store");
            _connectionString = settings.ConnectionString;
        }
        /// <summary>
        /// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
        /// </summary>
        public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
        {
            _displayCount = Math.Min(settings.Size, MaximumDisplayCount);

            if (settings.ConnectionString.IsNullOrEmpty())
            {
                throw new ArgumentOutOfRangeException("settings", "Connection string must be specified when using a SQL error store");
            }
            _connectionString = settings.ConnectionString;
        }
Exemple #3
0
        /// <summary>
        /// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
        /// The default table name is "Exceptions".
        /// </summary>
        /// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
        public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
        {
            _displayCount     = Math.Min(settings.Size, MaximumDisplayCount);
            _connectionString = settings.ConnectionString;
            _tableName        = settings.TableName ?? "Exceptions";

            if (_connectionString.IsNullOrEmpty())
            {
                throw new ArgumentOutOfRangeException(nameof(settings), "A connection string or connection string name must be specified when using a SQL error store");
            }
        }
        /// <summary>
        /// Creates a new instance of <see cref="SQLErrorStore"/> with the given configuration.
        /// </summary>        
        public SQLErrorStore(ErrorStoreSettings settings) : base(settings)
        {
            _displayCount = Math.Min(settings.Size, MaximumDisplayCount);

            _connectionString = settings.ConnectionString.IsNullOrEmpty() 
                ? GetConnectionStringByName(settings.ConnectionStringName)
                : settings.ConnectionString;

            if (_connectionString.IsNullOrEmpty())
                throw new ArgumentOutOfRangeException(nameof(settings), "A connection string or connection string name must be specified when using a SQL error store");
        }
        /// <summary>
        ///     Creates a new instance of <see cref="SQLErrorStore" /> with the given configuration.
        /// </summary>
        public MySQLErrorStore(ErrorStoreSettings settings)
            : base(settings)
        {
            _displayCount = Math.Min(settings.Size, MaximumDisplayCount);

            _connectionString = settings.ConnectionString.IsNullOrEmpty()
                ? GetConnectionStringByName(settings.ConnectionStringName)
                : settings.ConnectionString;

            if (_connectionString.IsNullOrEmpty())
            {
                throw new ArgumentOutOfRangeException("settings", "A connection string or connection string name must be specified when using a SQL error store");
            }
        }
 /// <summary>
 /// Creates a new instance of <see cref="SqlErrorStore"/> with the given configuration.
 /// </summary>
 public SqlErrorStore(ErrorStoreSettings settings)
     : this(settings.ConnectionString, settings.ConnectionStringName, settings.Size, settings.RollupSeconds)
 {
 }
Exemple #7
0
 /// <summary>
 /// Creates a new instance of <see cref="JSONErrorStore"/> with the given configuration.
 /// </summary>
 /// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
 public JSONErrorStore(ErrorStoreSettings settings) : base(settings)
 {
     _size = Math.Min(settings.Size, MaximumSize);
     _path = settings.Path.ResolvePath();
 }
 /// <summary>
 /// Creates a new instance of <see cref="MemoryErrorStore"/> with the given size.
 /// </summary>
 public MemoryErrorStore(ErrorStoreSettings settings) : base(settings)
 {
     _size = Math.Min(settings.Size, MaximumSize);
 }
 /// <summary>
 /// Creates a new instance of <see cref="JSONErrorStore"/> with the given configuration.
 /// </summary>        
 public JSONErrorStore(ErrorStoreSettings settings) : base(settings)
 {
     _size = Math.Min(settings.Size, MaximumSize);
     _path = settings.Path.ResolvePath();
 }
 /// <summary>
 /// Creates a new instance of <see cref="MemoryErrorStore"/> with the given size.
 /// </summary>
 public MemoryErrorStore(ErrorStoreSettings settings) : base(settings)
 {
     _size = Math.Min(settings.Size, MaximumSize);
 }
Exemple #11
0
 public EntityErrorStore(ErrorStoreSettings settings) : base(settings)
 {
 }
Exemple #12
0
 /// <summary>
 /// Creates a new instance of <see cref="MySQLErrorStore" /> with the given configuration.
 /// </summary>
 /// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
 public MySQLErrorStore(ErrorStoreSettings settings) : this(settings, "Exceptions")
 {
 }
 /// <summary>
 /// Creates a new instance of <see cref="PostgreSqlErrorStore" /> with the given configuration.
 /// </summary>
 /// <param name="settings">The <see cref="ErrorStoreSettings"/> for this store.</param>
 public PostgreSqlErrorStore(ErrorStoreSettings settings) : this(settings, @"public.""Errors""")
 {
 }