private static void NotifyRoleChanged(INotifySurveyElementChanged eventNotify, Role role) { foreach (ConstraintRoleSequence sequence in role.ConstraintRoleSequenceCollection) { UniquenessConstraint uniquenessConstraint; EntityTypeHasPreferredIdentifier identifierLink; if (null != (uniquenessConstraint = sequence as UniquenessConstraint) && null != (identifierLink = EntityTypeHasPreferredIdentifier.GetLinkToPreferredIdentifierFor(uniquenessConstraint))) { NotifyErrorStateChanged(eventNotify, identifierLink); } } eventNotify.ElementChanged(role, SurveyGlyphQuestionTypes); eventNotify.ElementRenamed(role); }
private static void NotifyErrorStateChanged(INotifySurveyElementChanged eventNotify, IModelErrorOwnerPath errorPath) { if (errorPath != null) { ModelError.WalkAssociatedElements(errorPath.ErrorOwnerRolePlayer, delegate(ModelElement associatedElement) { eventNotify.ElementChanged(associatedElement, SurveyErrorQuestionTypes); }); } }