Exemplo n.º 1
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                if ((this._parent.EOpposite == null))
                {
                    IEReference eOppositeCasted = item.As <IEReference>();
                    if ((eOppositeCasted != null))
                    {
                        this._parent.EOpposite = eOppositeCasted;
                        return;
                    }
                }
                IEAttribute eKeysCasted = item.As <IEAttribute>();

                if ((eKeysCasted != null))
                {
                    this._parent.EKeys.Add(eKeysCasted);
                }
                if ((this._parent.Refines == null))
                {
                    IEReference refinesCasted = item.As <IEReference>();
                    if ((refinesCasted != null))
                    {
                        this._parent.Refines = refinesCasted;
                        return;
                    }
                }
            }
Exemplo n.º 2
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     if ((this._parent.Refines == null))
     {
         IEAttribute refinesCasted = item.As <IEAttribute>();
         if ((refinesCasted != null))
         {
             this._parent.Refines = refinesCasted;
             return;
         }
     }
 }
Exemplo n.º 3
0
            /// <summary>
            /// Removes the given item from the collection
            /// </summary>
            /// <returns>True, if the item was removed, otherwise False</returns>
            /// <param name="item">The item that should be removed</param>
            public override bool Remove(IModelElement item)
            {
                if ((this._parent.EOpposite == item))
                {
                    this._parent.EOpposite = null;
                    return(true);
                }
                IEAttribute eAttributeItem = item.As <IEAttribute>();

                if (((eAttributeItem != null) &&
                     this._parent.EKeys.Remove(eAttributeItem)))
                {
                    return(true);
                }
                return(false);
            }
Exemplo n.º 4
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public IDProxy(IEAttribute modelElement) :
     base(modelElement, "iD")
 {
 }