/// <summary> /// Query the conformance for a choice /// </summary> private bool QueryConformance(Choice chc, TypeReference typeReference, ClassContent.ConformanceKind p) { bool retVal = true; foreach (ClassContent cc in chc.Content) { if (cc is Property) { retVal &= ((cc.Conformance & p) == cc.Conformance); } else if (cc is Choice) { retVal &= QueryConformance(cc as Choice, typeReference, p); } } return(retVal); }
/// <summary> /// Query conformance /// </summary> private bool QueryConformance(TypeReference typeReference, ClassContent.ConformanceKind p) { if (typeReference.Class == null) { return(false); } bool retVal = true; // Class content foreach (ClassContent cc in typeReference.Class.GetFullContent()) { if (cc is Property) { retVal &= ((cc.Conformance & p) == cc.Conformance); } else if (cc is Choice) { retVal &= QueryConformance(cc as Choice, typeReference, p); } } return(retVal); }