Class CollectionChangedNotificationResult<T>
- Namespace
- NMF.Expressions
- Assembly
- NMF.Expressions.dll
Denotes the standard implementation of a collection result
public class CollectionChangedNotificationResult<T> : ICollectionChangedNotificationResult<T>, ICollectionChangedNotificationResult, INotificationResult
Type Parameters
T
the type of elements
- Inheritance
-
CollectionChangedNotificationResult<T>
- Implements
- Inherited Members
- Extension Methods
Properties
AddedItems
Gets a list of added items
public List<T> AddedItems { get; }
Property Value
- List<T>
Changed
True, if there were changes, otherwise False
public bool Changed { get; }
Property Value
IsReset
True, if the collection was reset, otherwise False
public bool IsReset { get; }
Property Value
MovedItems
Gets a list of moved items
public List<T> MovedItems { get; }
Property Value
- List<T>
NewItemsStartIndex
Gets the first index of new items or -1
public int NewItemsStartIndex { get; set; }
Property Value
OldItemsStartIndex
Gets the first index of old items or -1
public int OldItemsStartIndex { get; set; }
Property Value
RemovedItems
Gets a list of removed items
public List<T> RemovedItems { get; }
Property Value
- List<T>
Source
The source of this result
public INotifiable Source { get; }
Property Value
Methods
Create(INotifiable, bool)
Creates a new instance of a collection notification
public static CollectionChangedNotificationResult<T> Create(INotifiable source, bool isReset = false)
Parameters
source
INotifiablethe source DDG node
isReset
boolTrue, if this is a reset, otherwise False
Returns
- CollectionChangedNotificationResult<T>
A collection notification instance
FreeReference()
Frees a reference
public void FreeReference()
IncreaseReferences(int)
Increases the reference counter
public void IncreaseReferences(int references)
Parameters
references
intThe number of references
Transfer(ICollectionChangedNotificationResult, INotifiable)
Transfers the provided notification to a new change source
public static CollectionChangedNotificationResult<T> Transfer(ICollectionChangedNotificationResult oldResult, INotifiable newSource)
Parameters
oldResult
ICollectionChangedNotificationResultThe old notification
newSource
INotifiableThe new change source
Returns
- CollectionChangedNotificationResult<T>
An updated notification
TurnIntoReset()
Turns this notification into a reset
public void TurnIntoReset()
UpdateNewStartIndex(int)
Updates the new start index
public void UpdateNewStartIndex(int startIndex)
Parameters
startIndex
intthe new start index of new items
UpdateOldStartIndex(int)
Updates the old start index
public void UpdateOldStartIndex(int startIndex)
Parameters
startIndex
intthe new start index of old items