public long DeletedListCount([NotNull] string tagName) { if (tagName == null) { throw new ArgumentNullException(nameof(tagName)); } return(UseConnection(redis => redis.ListLength(GetRedisKey(RedisTagsKeyInfo.GetDeletedKey(tagName))))); }
public JobList <DeletedJobDto> DeletedJobs(string tagName, int from, int count) { return(UseConnection(redis => { var deletedJobIds = redis .ListRange(GetRedisKey(RedisTagsKeyInfo.GetDeletedKey(tagName)), from, from + count - 1) .ToStringArray(); return GetJobsWithProperties( redis, deletedJobIds, null, new[] { "DeletedAt", "State" }, (job, jobData, state) => new DeletedJobDto { Job = job, DeletedAt = JobHelper.DeserializeNullableDateTime(state[0]), InDeletedState = DeletedState.StateName.Equals(state[1], StringComparison.OrdinalIgnoreCase) }); })); }