cat on a spaceship
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using Pluralize.NET;
|
||||
using Svrnty.CQRS.Abstractions.Discovery;
|
||||
|
||||
namespace Svrnty.CQRS.DynamicQuery.Discover;
|
||||
|
||||
public class DynamicQueryMeta : QueryMeta
|
||||
{
|
||||
public DynamicQueryMeta(Type queryType, Type serviceType, Type queryResultType) : base(queryType, serviceType, queryResultType)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Type SourceType => QueryType.GetGenericArguments()[0];
|
||||
public Type DestinationType => QueryType.GetGenericArguments()[1];
|
||||
public override string Category => "DynamicQuery";
|
||||
public override string Name
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OverridableName != null)
|
||||
return OverridableName;
|
||||
|
||||
var pluralizer = new Pluralizer();
|
||||
return pluralizer.Pluralize(DestinationType.Name);
|
||||
}
|
||||
}
|
||||
|
||||
public Type ParamsType { get; internal set; }
|
||||
public string OverridableName { get; internal set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user