You cannot use an open generic type Query<>, except typeof(). If you want to refer to a set of queries (no type is specified), you will need a non-generic API, for example:
public interface IQuery {
IList GetData();
Type QueryType { get; }
}
public interface IQuery<TModel> : IQuery
{
new IList<TModel> GetData();
}
public interface IQueryProvider
{
List<IQuery> GetAllQueries();
}
, , , IQuery , . , , - IQuery<Foo>, IQuery<Bar> - , QueryType.