Allow possibility of specifying the type to group with :)

This commit is contained in:
David Lebée
2018-03-12 17:23:02 -05:00
parent 9db5d74284
commit 165cc15d0a
5 changed files with 28 additions and 6 deletions
@@ -8,6 +8,7 @@ namespace PoweredSoft.DynamicLinq.Fluent
public class GroupBuilder
{
public List<(string path, string propertyName)> Parts { get; set; } = new List<(string path, string propertyName)>();
public Type Type { get; set; }
public bool Empty => !Parts.Any();
public GroupBuilder Path(string path, string propertyName = null)
@@ -30,5 +31,11 @@ namespace PoweredSoft.DynamicLinq.Fluent
Parts.Add((path, propertyName));
return this;
}
public GroupBuilder UseType(Type type)
{
Type = type;
return this;
}
}
}