/// <summary>
        ///
        /// </summary>
        /// <param name="configuration"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"></exception>
        public static IGlobalConfiguration <SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }

            var storage = new SQLiteStorage("Hangfire.db", new SQLiteStorageOptions());

            return(configuration.UseStorage(storage));
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="configuration"></param>
        /// <param name="nameOrConnectionString"></param>
        /// <param name="options"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException"></exception>
        public static IGlobalConfiguration <SQLiteStorage> UseSQLiteStorage(
            [NotNull] this IGlobalConfiguration configuration,
            [NotNull] string nameOrConnectionString,
            SQLiteStorageOptions options = null)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (nameOrConnectionString == null)
            {
                throw new ArgumentNullException(nameof(nameOrConnectionString));
            }
            if (options == null)
            {
                options = new SQLiteStorageOptions();
            }

            var storage = new SQLiteStorage(nameOrConnectionString, options);

            return(configuration.UseStorage(storage));
        }
 /// <summary>
 /// Constructs expiration manager with one hour checking interval
 /// </summary>
 /// <param name="storage">LiteDb storage</param>
 public ExpirationManager(SQLiteStorage storage)
     : this(storage, TimeSpan.FromHours(1))
 {
 }
 /// <summary>
 /// Constructs expiration manager with specified checking interval
 /// </summary>
 /// <param name="storage">LiteDB storage</param>
 /// <param name="checkInterval">Checking interval</param>
 public ExpirationManager(SQLiteStorage storage, TimeSpan checkInterval)
 {
     _storage       = storage ?? throw new ArgumentNullException(nameof(storage));
     _checkInterval = checkInterval;
 }
 /// <summary>
 /// Constructs Counter collection aggregator
 /// </summary>
 /// <param name="storage">SQLite storage</param>
 /// <param name="interval">Checking interval</param>
 public CountersAggregator(SQLiteStorage storage, TimeSpan interval)
 {
     _storage  = storage ?? throw new ArgumentNullException(nameof(storage));
     _interval = interval;
 }