better way to inject interceptors into the dynamic query.

This commit is contained in:
David Lebee
2021-02-03 01:26:37 -05:00
parent d01ac1601c
commit de98b3b472
14 changed files with 263 additions and 73 deletions
@@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
namespace PoweredSoft.CQRS.DynamicQuery.Abstractions
{
public class DynamicQueryInterceptorProvider<TSource, TDestination> : IDynamicQueryInterceptorProvider<TSource, TDestination>
{
private readonly Type[] types;
public DynamicQueryInterceptorProvider(params Type[] types)
{
this.types = types;
}
public IEnumerable<Type> GetInterceptorsTypes()
{
return types;
}
}
}
@@ -0,0 +1,12 @@
using PoweredSoft.DynamicQuery.Core;
using System;
using System.Collections.Generic;
using System.Text;
namespace PoweredSoft.CQRS.DynamicQuery.Abstractions
{
public interface IDynamicQueryInterceptorProvider<TSource, TDestination>
{
IEnumerable<Type> GetInterceptorsTypes();
}
}