forked from ThatRendle/Simple.Data
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDataResult.cs
More file actions
27 lines (21 loc) · 741 Bytes
/
DataResult.cs
File metadata and controls
27 lines (21 loc) · 741 Bytes
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
namespace Simple.Data
{
using System.Collections.Generic;
using System.Linq;
public sealed class DataResult : OperationResult
{
public static readonly DataResult Empty = new DataResult(Enumerable.Empty<IDictionary<string,object>>());
private readonly IEnumerable<IDictionary<string, object>> _data;
public IEnumerable<IDictionary<string, object>> Data
{
get { return _data; }
}
public DataResult(IDictionary<string, object> data) : this(EnumerableEx.Once(data))
{
}
public DataResult(IEnumerable<IDictionary<string, object>> data) : base(0)
{
_data = data;
}
}
}