Table of Contents

Class DomCollectionBase<T>

Namespace
combit.Reporting.Dom
Assembly
combit.ListLabel31.CrossPlatform.dll

Provides a base class for collections of combit.Reporting.Dom.DomCollectionBase<T>.DomItem objects in the DOM. Supports initialization, synchronization, code generation, and collection operations.

public abstract class DomCollectionBase<T> : ObservableCollection<T>, IList<T>, ICollection<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IList, ICollection, IEnumerable, INotifyCollectionChanged, INotifyPropertyChanged, IDomCollectionBase where T : DomItem

Type Parameters

T

The type of combit.Reporting.Dom.DomCollectionBase<T>.DomItem contained in the collection.

Inheritance
DomCollectionBase<T>
Implements
Derived
Inherited Members

Fields

_domItem

The parent combit.Reporting.Dom.DomCollectionBase<T>.DomItem associated with this collection.

protected DomItem _domItem

Field Value

DomItem

Methods

ClearItems()

Removes all items from the collection.

protected override void ClearItems()

CopyFrom(DomCollectionBase<T>, bool)

Copies the items from the specified source collection to this collection.

public void CopyFrom(DomCollectionBase<T> source, bool forceSaveInvalidFormula = false)

Parameters

source DomCollectionBase<T>

The source collection.

forceSaveInvalidFormula bool

Whether to force saving invalid formulas.

ForEach(Action<T>)

Performs the specified action on each element of the collection.

public void ForEach(Action<T> action)

Parameters

action Action<T>

The Action<T> delegate to perform on each element.

Exceptions

ArgumentNullException

Thrown when action is null.

GenerateCode(CodeMemberMethod, string)

Generates code for the collection and its items.

public void GenerateCode(CodeMemberMethod method, string prefix)

Parameters

method CodeMemberMethod

The code member method to add statements to.

prefix string

The prefix for code generation.

ImportFrom(DomCollectionBase<T>, bool)

Imports items from the specified source collection.

public virtual void ImportFrom(DomCollectionBase<T> source, bool forceSaveInvalidFormula = false)

Parameters

source DomCollectionBase<T>

The source collection.

forceSaveInvalidFormula bool

Whether to force saving invalid formulas.

InitializeInternalList(DomCollectionBase<T>)

Initializes the internal list of subobjects from the specified source collection.

protected virtual void InitializeInternalList(DomCollectionBase<T> source)

Parameters

source DomCollectionBase<T>

The source collection.

MoveItem(int, int)

Moves an item within the collection and updates the underlying DOM structure.

protected override void MoveItem(int oldIndex, int newIndex)

Parameters

oldIndex int

The original index of the item.

newIndex int

The new index of the item.

Remove(T)

Removes the specified item from the collection, taking into account different sortings.

public bool Remove(T item)

Parameters

item T

The item to remove.

Returns

bool

true if the item was removed; otherwise, false.

RemoveItem(int)

Removes the item at the specified index and updates the underlying DOM structure.

protected override void RemoveItem(int index)

Parameters

index int

The index of the item to remove.

SynchronizeList(DomCollectionBase<T>, bool, bool, bool)

Synchronizes the items in the collection with those in the source collection.

protected virtual void SynchronizeList(DomCollectionBase<T> source, bool overwriteInternalId, bool forceSaveInvalidFormula = false, bool evaluateProperties = false)

Parameters

source DomCollectionBase<T>

The source collection.

overwriteInternalId bool

Whether to overwrite internal IDs.

forceSaveInvalidFormula bool

Whether to force saving invalid formulas.

evaluateProperties bool

Whether to evaluate the properties that are formulas on their current state