Table of Contents

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

bool

IsReset

True, if the collection was reset, otherwise False

public bool IsReset { get; }

Property Value

bool

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

int

OldItemsStartIndex

Gets the first index of old items or -1

public int OldItemsStartIndex { get; set; }

Property Value

int

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

INotifiable

Methods

Create(INotifiable, bool)

Creates a new instance of a collection notification

public static CollectionChangedNotificationResult<T> Create(INotifiable source, bool isReset = false)

Parameters

source INotifiable

the source DDG node

isReset bool

True, 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 int

The 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 ICollectionChangedNotificationResult

The old notification

newSource INotifiable

The 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 int

the new start index of new items

UpdateOldStartIndex(int)

Updates the old start index

public void UpdateOldStartIndex(int startIndex)

Parameters

startIndex int

the new start index of old items