/// <summary> /// Returns a list of all queues found. /// </summary> /// <returns></returns> public IList <string> AllQueues() { var allKeys = TypedClient.GetAllKeys().Where(x => x.StartsWith("queue:")); var queues = new HashSet <string>(); foreach (var key in allKeys) { queues.Add(key.Split(':')[1]); } return(queues.ToList()); }
/// <summary> /// Disposable impl. Handles cleanup and marks any uncompleted tasks as failed. /// </summary> public void Dispose() { // the consumer did not assert the task was succesfully completed, // or something sinister has happened. Add the task to the failed tasks list. if (State == RedisQueueState.TaskReserved && !LocalCachingEnabled) { Fail("RedisClient disposed prior to the task being completed."); } TypedClient.Dispose(); GenericClient.Dispose(); Log.Info("Disconnected from Redis."); Log.DebugFormat("Client state on disconnect: {0}", State); }
public MyClass(TypedClient typedClient, ICookieContainerAccessor accessor) { this.accessor = accessor; this.typedClient = typedClient; }
public MySQLBulkRepository(MySQLDbContext context) { _typedClient = new TypedClient <TEntity, MySqlConnection, TKey>(context.ConnectionString, SQLLanguageType.MySQL); _bulkClient = new MySQLBulkClient <TEntity>(context.ConnectionString); }
public TestController(IHttpClientFactory httpClientFactory, TypedClient typedClient) { _httpClientFactory = httpClientFactory; _typedClient = typedClient; }
public SQLServerRepository(SQLServerDbContext context) { _typedClient = new TypedClient <TEntity, SqlConnection, TKey>(context.ConnectionString, SQLLanguageType.SQLServer); }