public static bool isSelfAssociation(List <object> connection, CoreClassifier classifier) { if (connection.Count == 2) { CoreAssociationEnd assocEnd0 = (CoreAssociationEnd)connection[0]; CoreAssociationEnd assocEnd1 = (CoreAssociationEnd)connection[1]; if (((assocEnd0.getTheParticipant() == assocEnd1.getTheParticipant()) && (classifier == assocEnd0.getTheParticipant()))) { return(true); } } return(false); }
public static bool isSelfAssociation(List <object> connection, CoreClassifier classifier) { if (connection.Count == 2) { IEnumerator <object> iter = connection.GetEnumerator(); iter.MoveNext(); CoreAssociationEnd assocEnd0 = (CoreAssociationEnd)iter.Current; iter.MoveNext(); CoreAssociationEnd assocEnd1 = (CoreAssociationEnd)iter.Current; if (((assocEnd0.getTheParticipant() == assocEnd1.getTheParticipant()) && (classifier == assocEnd0.getTheParticipant()))) { return(true); } } return(false); }