C++ C#

ItemObjectViewList<I,V> Class

API Reference

Namespace: Semata.DataStore.ObjectModel.Views

A list ItemObjects that will be loaded from an ItemObjectCollection. The list will only be loaded when accessed, not when created, i.e. it is lazy

generic <typename I, typename V>
where I : ItemObject where V : ItemObjectView<I>
public ref class ItemObjectViewList : public IList<V^>, IList, IReadOnlyList<V^>, INotifyCollectionChanged, INotifyStateChanged, IEditableDataCreator

Implements: IList<V> , IList , IReadOnlyList<V> , INotifyCollectionChanged , INotifyStateChanged , IEditableDataCreator

Constructors

Name Description
ItemObjectViewList(ItemObjectCollection<I>^, Func<I, V>^)

Constructs a new instance of ItemObjectViewList.

ItemObjectViewList(ItemObjectCollection<I>^, Func<IEnumerable<I>, IEnumerable<I>>^, Func<I, V>^)

Constructs a new instance of ItemObjectViewList.

ItemObjectViewList(ItemObjectCollection<I>^, Func<IEnumerable<I>, IEnumerable<I>>^, Func<I, V>^, Action<List<V>>^, Action<List<V>>^, bool)

Constructs a new instance of ItemObjectViewList.

If delayRemoves is true, it would be usual to set WriteOnEndEdit to false on the ItemObjectView created by Creator(). So that both adds and removes are performed on WriteChanges()

Events

Name Description
CollectionChanged

Raised for each individual change in the list Add, Move, Remove, Reset

ListChanged

Raised after the list is changed

StateChanged

Raised after the list is changed, or an list element is changed

Properties

Name Description
Count

Gets the number of elements contained in the ItemObjectViewList<I, V>.

Creator

The delegate that returns a ItemObjectView from an ItemObject

HasErrors

Returns true if any of the ItemObjectViews in the list has any errors

HasNew

Returns true if any of the ItemObjectViews is new

IsChanged

Returns true if any of the ItemObjectViews has changed or been deleted

IsChangedOrHasNew

Returns true if any of the ItemObjectViews has changed, been deleted, or is new

IsFixedSize

Returns false

IsReadOnly

Returns false

IsSynchronized

Returns false

SyncRoot

Returns false

this

Gets the ItemObjectView<I> at the specified index

Methods

Name Description
Add(V^)

Adds an ItemObjectView<I> to the end of the ItemObjectViewList<I, V>.

AddNew()

Creates a new I from the underlying ItemObjectCollection<I> Uses the ItemObjectViewCreator to create a view on the I Adds the view to the end of the ItemObjectViewList<I, V>.

CancelChanges()

Cancel any changes

Clear()

Not Supported

ClearErrors()

Clears the errors, at the object level, from all the ItemObjectViews in the list

ClearErrors(String^)

Clears the errors, for a given property name, from all the ItemObjectViews in the list

Contains(V^)

Determines whether an ItemObjectView<I> is in the ItemObjectViewList<I, V>.

CopyTo()

Copies the ItemObjectViewList<I, V> to an array. Starting at arrayIndex.

GetEnumerator()

Returns an enumerator that iterates through the ItemObjectViewList<I, V>.

GetErrors()

Returns an enumerable containing the errors, at the object level, from all the ItemObjectViews in the list

GetErrors(String^)

Returns an enumerable containing the errors, for a given property name, from all the ItemObjectViews in the list

IndexOf(V^)

Returns the zero-based index of the ItemObjectView<I> in the ItemObjectViewList<I, V>.

Insert(int, V^)

Not Supported

Reload()

Reloads the list

Remove(V^)

Removes the specified ItemObjectView<I> from the ItemObjectViewList<I, V>.

RemoveAt(int)

Removes the ItemObjectView<I> at the specified index of the ItemObjectViewList<I, V>

ValidateChanges()

Calls Validate() on each ItemObjectView in the list, and returns true if they are all valid

WriteChanges()

Write the changes to the DataStore

This website stores cookies on your computer that are used to manage the order in which you see the pages. To find out more about the cookies we use, see our Privacy Policy.