forked from zzzprojects/System.Linq.Dynamic.Core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupResult.cs
More file actions
44 lines (39 loc) · 1.32 KB
/
GroupResult.cs
File metadata and controls
44 lines (39 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
namespace System.Linq.Dynamic.Core
{
/// <summary>
/// The result of a call to a <see cref="DynamicQueryable"/>.GroupByMany() overload.
/// </summary>
public class GroupResult
{
/// <summary>
/// The key value of the group. (TODO : check for DNXCORE50 || DOTNET5_4)
/// </summary>
#if NET35 || SILVERLIGHT
public object Key { get; internal set; }
#else
public dynamic Key { get; internal set; }
#endif
/// <summary>
/// The number of resulting elements in the group.
/// </summary>
public int Count { get; internal set; }
/// <summary>
/// The resulting elements in the group.
/// </summary>
public IEnumerable Items { get; internal set; }
/// <summary>
/// The resulting subgroups in the group.
/// </summary>
public IEnumerable<GroupResult> Subgroups { get; internal set; }
/// <summary>
/// Returns a string showing the key of the group and the number of items in the group.
/// </summary>
public override string ToString()
{
return string.Format(CultureInfo.CurrentCulture, "{0} ({1})", ((object)Key).ToString(), Count);
}
}
}