private void ValidateDefiningProperty()
        {
            if (ParentElement == null)
            {
                return;
            }

            var declaringPropertyModel = ParentElement.Properties
                                         .Where(p => DeclaringProperty.Equals(p.DeclaringProperty)).FirstOrDefault();

            if (declaringPropertyModel == null)
            {
                return;
            }

            declaringPropertyModel.Validate();
        }
示例#2
0
 ///<summary>
 /// Deletes this element.
 ///</summary>
 public virtual void Delete()
 {
     DeclaringProperty.SetValue(ParentElement.ConfigurationElement, null);
     OnDeleted();
 }