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
TThe type of combit.Reporting.Dom.DomCollectionBase<T>.DomItem contained in the collection.
- Inheritance
-
Collection<T>DomCollectionBase<T>
- Implements
-
IList<T>ICollection<T>IEnumerable<T>
- Derived
- Inherited Members
Fields
_domItem
The parent combit.Reporting.Dom.DomCollectionBase<T>.DomItem associated with this collection.
protected DomItem _domItem
Field Value
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
sourceDomCollectionBase<T>The source collection.
forceSaveInvalidFormulaboolWhether 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
Exceptions
- ArgumentNullException
Thrown when
actionisnull.
GenerateCode(CodeMemberMethod, string)
Generates code for the collection and its items.
public void GenerateCode(CodeMemberMethod method, string prefix)
Parameters
methodCodeMemberMethodThe code member method to add statements to.
prefixstringThe 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
sourceDomCollectionBase<T>The source collection.
forceSaveInvalidFormulaboolWhether 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
sourceDomCollectionBase<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
Remove(T)
Removes the specified item from the collection, taking into account different sortings.
public bool Remove(T item)
Parameters
itemTThe item to remove.
Returns
- bool
trueif 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
indexintThe 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
sourceDomCollectionBase<T>The source collection.
overwriteInternalIdboolWhether to overwrite internal IDs.
forceSaveInvalidFormulaboolWhether to force saving invalid formulas.
evaluatePropertiesboolWhether to evaluate the properties that are formulas on their current state