public bool validate_EveryMultiplicityConforms(EObject eObject, DiagnosticChain diagnostics, Dictionary <object, object> context)
        {
            bool   result = true;
            EClass eClass = eObject.eClass();

            for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
            {
                result &= validate_MultiplicityConforms(eObject, eClass.getEStructuralFeature(i), diagnostics, context);
                if (!result && diagnostics == null)
                {
                    return(false);
                }
            }
            return(result);
        }
        public bool validate_EveryKeyUnique(EObject eObject, DiagnosticChain diagnostics, Dictionary <object, object> context)
        {
            bool   result = true;
            EClass eClass = eObject.eClass();

            for (int i = 0, size = eClass.getFeatureCount(); i < size; ++i)
            {
                EStructuralFeature eStructuralFeature = eClass.getEStructuralFeature(i);
                if (eStructuralFeature is EReference)
                {
                    EReference eReference = (EReference)eStructuralFeature;
                    if (eReference.many && !eReference.eKeys.isEmpty())
                    {
                        result &= validate_KeyUnique(eObject, eReference, diagnostics, context);
                        if (!result && diagnostics == null)
                        {
                            return(false);
                        }
                    }
                }
            }
            return(result);
        }