Repository navigation
Expand file tree
/
Copy pathChangeReason.cs
More file actions
103 lines (86 loc) · 2.04 KB
/
Copy pathChangeReason.cs
File metadata and controls
103 lines (86 loc) · 2.04 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
namespace DynamicData
{
/// <summary>
/// The type of aggregation
/// </summary>
public enum AggregateType
{
/// <summary>
/// The add
/// </summary>
Add,
/// <summary>
/// The remove
/// </summary>
Remove
}
/// <summary>
///
/// </summary>
/// <typeparam name="TObject">The type of the object.</typeparam>
/// <typeparam name="TKey">The type of the key.</typeparam>
public struct AggregateItem<TObject, TKey>
{
/// <summary>
/// Initializes a new instance of the <see cref="AggregateItem{TObject, TKey}"/> struct.
/// </summary>
/// <param name="type">The type.</param>
/// <param name="item">The item.</param>
/// <param name="key">The key.</param>
public AggregateItem(AggregateType type, TObject item, TKey key)
{
Type = type;
Item = item;
Key = key;
}
/// <summary>
/// Gets the key.
/// </summary>
public TKey Key { get; }
/// <summary>
/// Gets the type.
/// </summary>
public AggregateType Type { get; }
/// <summary>
/// Gets the item.
/// </summary>
public TObject Item { get; }
}
internal interface ISupportsCapcity
{
int Capacity { get; set; }
int Count { get; }
}
/// <summary>
/// The reason for an individual change.
///
/// Used to signal consumers of any changes to the underlying cache
/// </summary>
public enum ChangeReason
{
/// <summary>
/// An item has been added
/// </summary>
Add,
/// <summary>
/// An item has been updated
/// </summary>
Update,
/// <summary>
/// An item has removed
/// </summary>
Remove,
/// <summary>
/// Command to operators to re-evaluate.
/// </summary>
Evaluate,
/// <summary>
/// An item has been moved in a sorted collection
/// </summary>
Moved,
/// <summary>
/// The entire collection has been cleared
/// </summary>
Clear,
}
}