void IPersistIfcEntity.Activate(bool write) { lock (this) { if (_model != null && !_activated) { _activated = _model.Activate(this, false) > 0; } } if (write) { _model.Activate(this, write); } }
void IPersistIfcEntity.Activate(bool write) { lock (this) { if (_model != null && !_activated) { _activated = _model.Activate(this, false) > 0; } } if (write) { _model.Activate(this, write); if (_model.AutoAddOwnerHistory && _ownerHistory != (_model.OwnerHistoryAddObject as IfcOwnerHistory)) //no need to do it if it is already set { if (_ownerHistory != (_model.OwnerHistoryModifyObject as IfcOwnerHistory)) { Transaction.AddPropertyChange(v => OwnerHistory = v, _ownerHistory, (IfcOwnerHistory)_model.OwnerHistoryModifyObject); ((ISupportChangeNotification)this).NotifyPropertyChanging("OwnerHistory"); _ownerHistory = (IfcOwnerHistory)_model.OwnerHistoryModifyObject; ((ISupportChangeNotification)this).NotifyPropertyChanged("OwnerHistory"); } } } }
public bool Activate(IPersistEntity owningEntity) { return(_model.Activate(owningEntity)); }