Skip to content

Class DirtyTrackingList<T>

Definition

Namespace: StardewUI.Layout
Assembly: StardewUI.dll

List wrapper that tracks whether changes have been made.

public class DirtyTrackingList<T> : System.Collections.Generic.IList<T>, 
    System.Collections.Generic.ICollection<T>, 
    System.Collections.Generic.IEnumerable<T>, System.Collections.IEnumerable, 
    System.Collections.Generic.IReadOnlyList<T>, 
    System.Collections.Generic.IReadOnlyCollection<T>

Type Parameters

T
The type of elements in the list.

Inheritance
Object ⇦ DirtyTrackingList<T>

Implements
IList<T>, ICollection<T>, IEnumerable<T>, IEnumerable, IReadOnlyList<T>, IReadOnlyCollection<T>

Members

Constructors

Name Description
DirtyTrackingList<T>()

Properties

Name Description
Count
IsDirty Whether changes have been made since the last call to ResetDirty().
IsReadOnly
Item[int]

Methods

Name Description
Add(T)
Clear()
Contains(T)
CopyTo(T, Int32)
GetEnumerator()
IndexOf(T)
Insert(Int32, T)
Remove(T)
RemoveAt(Int32)
ResetDirty() Resets the dirty state; IsDirty will return false until another mutation occurs.
SetItems(IEnumerable<T>) Replaces the entire list with the specified sequence.

Details

Constructors

DirtyTrackingList<T>()

public DirtyTrackingList<T>();

Properties

Count

public int Count { get; }
Property Value

Int32


IsDirty

Whether changes have been made since the last call to ResetDirty().

public bool IsDirty { get; private set; }
Property Value

Boolean


IsReadOnly

public bool IsReadOnly { get; }
Property Value

Boolean


Item[int]

public T Item[int] { get; set; }
Property Value

T


Methods

Add(T)

public void Add(T item);
Parameters

item   T


Clear()

public void Clear();

Contains(T)

public bool Contains(T item);
Parameters

item   T

Returns

Boolean


CopyTo(T, int)

public void CopyTo(T array, int arrayIndex);
Parameters

array   T

arrayIndex   Int32


GetEnumerator()

public System.Collections.Generic.IEnumerator<T> GetEnumerator();
Returns

IEnumerator<T>


IndexOf(T)

public int IndexOf(T item);
Parameters

item   T

Returns

Int32


Insert(int, T)

public void Insert(int index, T item);
Parameters

index   Int32

item   T


Remove(T)

public bool Remove(T item);
Parameters

item   T

Returns

Boolean


RemoveAt(int)

public void RemoveAt(int index);
Parameters

index   Int32


ResetDirty()

Resets the dirty state; IsDirty will return false until another mutation occurs.

public void ResetDirty();

SetItems(IEnumerable<T>)

Replaces the entire list with the specified sequence.

public bool SetItems(System.Collections.Generic.IEnumerable<T> items);
Parameters

items   IEnumerable<T>
The new list items.

Returns

Boolean