InternalAdd method

void InternalAdd(
  1. TComplexProperty complexProperty, [
  2. bool loading = false
])
Add complex property. The complex property. If true, collection is being loaded.

Implementation

/* private */
void InternalAdd(TComplexProperty complexProperty, [bool loading = false]) {
  EwsUtilities.Assert(complexProperty != null,
      "ComplexPropertyCollection.InternalAdd", "complexProperty is null");

  if (!this._items.contains(complexProperty)) {
    this._items.add(complexProperty);
    if (!loading) {
      this._removedItems.remove(complexProperty);
      this._addedItems.add(complexProperty);
    }
    complexProperty.addOnChangeEvent(this.ItemChanged);
    this.Changed();
  }
}