DeleteProperty method

void DeleteProperty(
  1. PropertyDefinition propertyDefinition
)
Deletes the property from the bag. The property to delete.

Implementation

void DeleteProperty(PropertyDefinition propertyDefinition) {
  if (!this._deletedProperties.containsKey(propertyDefinition)) {
    Object? propertyValue;

    propertyValue = this._properties[propertyDefinition];

    this._properties.remove(propertyDefinition);
    this._modifiedProperties.remove(propertyDefinition);
    this._deletedProperties[propertyDefinition] = propertyValue;

    if (propertyValue is ComplexProperty) {
      propertyValue.removeChangeEvent(this.PropertyChanged);
    }
  }
}