private bool PropDefIsCompulsory(IRelPropDef def) { return (def.OwnerPropDef != null && def.OwnerPropDef.Compulsory) || (this.OwningClassDef != null && this.OwningClassDef.GetPropDef(def.OwnerPropertyName).Compulsory); }