Remove unused types

This commit is contained in:
Sipke Schoorstra 2020-12-20 14:37:16 +01:00
parent a1c042ea61
commit 345fbb894a
2 changed files with 0 additions and 45 deletions

View file

@ -1,21 +0,0 @@
using NodaTime;
namespace Elsa.Persistence.YesSql.Documents
{
public class SuspendedWorkflowBlockingActivityDocument : YesSqlDocument
{
public string EntityId { get; set; } = default!;
public string InstanceId { get; set; } = default!;
public string DefinitionId { get; set; } = default!;
public int Version { get; set; }
public string? CorrelationId { get; set; }
public string? ContextId { get; set; }
public string? TenantId { get; set; }
public Instant CreatedAt { get; set; }
public Instant? LastExecutedAt { get; set; }
public string ActivityId { get; set; } = default!;
public string ActivityType { get; set; } = default!;
}
}

View file

@ -1,24 +0,0 @@
using Elsa.Persistence.Specifications;
using YesSql;
using YesSql.Indexes;
namespace Elsa.Persistence.YesSql.Extensions
{
public static class YesSqlSpecificationExtensions
{
public static IQuery<TDocument, TIndex> Apply<T, TDocument, TIndex>(this IQuery<TDocument, TIndex> queryable, ISpecification<T> specification) where T : class where TIndex : IIndex where TDocument : class =>
queryable.Where(specification.ToExpression().ConvertType<T, TDocument>().ConvertType<TDocument, TIndex>());
public static IQuery<TDocument, TIndex> Apply<T, TDocument, TIndex>(this IQuery<TDocument, TIndex> queryable, IOrderBy<T>? specification) where TIndex : IIndex where T : class where TDocument : class
{
if (specification == null)
return queryable;
var orderByExpression = specification.OrderByExpression.ConvertType<T, TDocument>().ConvertType<TDocument, TIndex>();
return specification.SortDirection == SortDirection.Ascending ? queryable.OrderBy(orderByExpression) : queryable.OrderByDescending(orderByExpression);
}
public static IQuery<TDocument, TIndex> Apply<TDocument, TIndex>(this IQuery<TDocument, TIndex> queryable, IPaging? specification) where TIndex : IIndex where TDocument : class =>
specification == null ? queryable : (IQuery<TDocument, TIndex>) queryable.Skip(specification.Skip).Take(specification.Take);
}
}