dotnet-dynamic-query/PoweredSoft.DynamicQuery/Filter.cs
2018-10-17 21:14:21 -05:00

29 lines
736 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using PoweredSoft.DynamicQuery.Core;
namespace PoweredSoft.DynamicQuery
{
public abstract class Filter : IFilter
{
public bool? And { get; set; }
public FilterType Type { get; set; }
}
public class SimpleFilter : ISimpleFilter
{
public bool? And { get; set; }
public FilterType Type { get; set; }
public string Path { get; set; }
public object Value { get; set; }
}
public class CompositeFilter : ICompositeFilter
{
public bool? And { get; set; }
public FilterType Type { get; set; } = FilterType.Composite;
public List<IFilter> Filters { get; set; }
}
}