Exemple #1
0
        public override void eSet(int featureID, object newValue)
        {
            switch (featureID)
            {
            case SerializationPackageImpl.MY_CLASS__ATTRIBUTE_STRING:
                attribute_string = (string)newValue;
                return;

            case SerializationPackageImpl.MY_CLASS__OTHERCLASS:
                otherclass.Clear();
                otherclass.AddRange(((List <EObject>)newValue)?.Cast <OtherClass>());
                return;

            case SerializationPackageImpl.MY_CLASS__SELECTION:
                selection = (OtherClass)newValue;
                return;

            case SerializationPackageImpl.MY_CLASS__YETANOTHERCLASS:
                yetanotherclass.Clear();
                yetanotherclass.AddRange(((List <EObject>)newValue)?.Cast <YetAnotherClass>());
                return;

            case SerializationPackageImpl.MY_CLASS__SELECTION2:
                selection2 = (YetAnotherClass)newValue;
                return;
            }
            base.eSet(featureID, newValue);
        }
Exemple #2
0
        public NotificationChain basicSetSelection2(YetAnotherClass newobj, NotificationChain msgs)
        {
            var oldobj = _selection2;

            _selection2 = newobj;
            if (eNotificationRequired())
            {
                var notification = new ENotificationImpl(this, NotificationImpl.SET, SerializationPackageImpl.MY_CLASS__SELECTION2, oldobj, newobj);
                if (msgs == null)
                {
                    msgs = notification;
                }
                else
                {
                    msgs.add(notification);
                }
            }
            return(msgs);
        }
Exemple #3
0
        public bool validateYetAnotherClass(YetAnotherClass obj, DiagnosticChain diagnostics, Dictionary <object, object> context)
        {
            if (!validate_NoCircularContainment(obj, diagnostics, context))
            {
                return(false);
            }
            bool result = validate_EveryMultiplicityConforms(obj, diagnostics, context);

            if (result || diagnostics != null)
            {
                result &= validate_EveryDataValueConforms(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryReferenceIsContained(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryBidirectionalReferenceIsPaired(obj, diagnostics, context);
            }
            //if (result || diagnostics != null) result &= validate_EveryProxyResolves(obj, diagnostics, context);
            if (result || diagnostics != null)
            {
                result &= validate_UniqueID(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryKeyUnique(obj, diagnostics, context);
            }
            if (result || diagnostics != null)
            {
                result &= validate_EveryMapEntryUnique(obj, diagnostics, context);
            }

            return(result);
        }
 public virtual T caseYetAnotherClass(YetAnotherClass theEObject)
 {
     return(default(T));
 }