private void ValidateDefiningProperty() { if (ParentElement == null) { return; } var declaringPropertyModel = ParentElement.Properties .Where(p => DeclaringProperty.Equals(p.DeclaringProperty)).FirstOrDefault(); if (declaringPropertyModel == null) { return; } declaringPropertyModel.Validate(); }
///<summary> /// Deletes this element. ///</summary> public virtual void Delete() { DeclaringProperty.SetValue(ParentElement.ConfigurationElement, null); OnDeleted(); }