示例#1
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)
 {
     IDPL dPLItem = item.As<IDPL>();
     if (((dPLItem != null) 
                 && this._parent.DPL.Remove(dPLItem)))
     {
         return true;
     }
     ILPL lPLItem = item.As<ILPL>();
     if (((lPLItem != null) 
                 && this._parent.LPL.Remove(lPLItem)))
     {
         return true;
     }
     ICSD cSDItem = item.As<ICSD>();
     if (((cSDItem != null) 
                 && this._parent.CSD.Remove(cSDItem)))
     {
         return true;
     }
     IC_PrimitiveCDC c_PrimitiveCDCItem = item.As<IC_PrimitiveCDC>();
     if (((c_PrimitiveCDCItem != null) 
                 && this._parent.C_PrimitiveCDC.Remove(c_PrimitiveCDCItem)))
     {
         return true;
     }
     return false;
 }
示例#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.EEName == null))
     {
         IDPL eENameCasted = item.As <IDPL>();
         if ((eENameCasted != null))
         {
             this._parent.EEName = eENameCasted;
             return;
         }
     }
     if ((this._parent.OpTmh == null))
     {
         IINS opTmhCasted = item.As <IINS>();
         if ((opTmhCasted != null))
         {
             this._parent.OpTmh = opTmhCasted;
             return;
         }
     }
     if ((this._parent.HzRtg == null))
     {
         IASG hzRtgCasted = item.As <IASG>();
         if ((hzRtgCasted != null))
         {
             this._parent.HzRtg = hzRtgCasted;
             return;
         }
     }
     if ((this._parent.Rat == null))
     {
         IASG ratCasted = item.As <IASG>();
         if ((ratCasted != null))
         {
             this._parent.Rat = ratCasted;
             return;
         }
     }
     if ((this._parent.Cor == null))
     {
         IASG corCasted = item.As <IASG>();
         if ((corCasted != null))
         {
             this._parent.Cor = corCasted;
             return;
         }
     }
     if ((this._parent.AngCor == null))
     {
         IASG angCorCasted = item.As <IASG>();
         if ((angCorCasted != null))
         {
             this._parent.AngCor = angCorCasted;
             return;
         }
     }
 }
示例#3
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.EEName == null))
     {
         IDPL eENameCasted = item.As <IDPL>();
         if ((eENameCasted != null))
         {
             this._parent.EEName = eENameCasted;
             return;
         }
     }
 }
示例#4
0
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(IModelElement item)
 {
     IDPL dPLCasted = item.As<IDPL>();
     if ((dPLCasted != null))
     {
         this._parent.DPL.Add(dPLCasted);
     }
     ILPL lPLCasted = item.As<ILPL>();
     if ((lPLCasted != null))
     {
         this._parent.LPL.Add(lPLCasted);
     }
     ICSD cSDCasted = item.As<ICSD>();
     if ((cSDCasted != null))
     {
         this._parent.CSD.Add(cSDCasted);
     }
     IC_PrimitiveCDC c_PrimitiveCDCCasted = item.As<IC_PrimitiveCDC>();
     if ((c_PrimitiveCDCCasted != null))
     {
         this._parent.C_PrimitiveCDC.Add(c_PrimitiveCDCCasted);
     }
 }