Пример #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.OpTmh == null))
     {
         IINS opTmhCasted = item.As <IINS>();
         if ((opTmhCasted != null))
         {
             this._parent.OpTmh = opTmhCasted;
             return;
         }
     }
     if ((this._parent.ReactorControl == null))
     {
         IARCO reactorControlCasted = item.As <IARCO>();
         if ((reactorControlCasted != null))
         {
             this._parent.ReactorControl = reactorControlCasted;
             return;
         }
     }
 }
Пример #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.OpTmh == null))
     {
         IINS opTmhCasted = item.As <IINS>();
         if ((opTmhCasted != null))
         {
             this._parent.OpTmh = opTmhCasted;
             return;
         }
     }
     if ((this._parent.CapDS == null))
     {
         ISPC capDSCasted = item.As <ISPC>();
         if ((capDSCasted != null))
         {
             this._parent.CapDS = capDSCasted;
             return;
         }
     }
     if ((this._parent.DschBlk == null))
     {
         ISPS dschBlkCasted = item.As <ISPS>();
         if ((dschBlkCasted != null))
         {
             this._parent.DschBlk = dschBlkCasted;
             return;
         }
     }
     if ((this._parent.CapControl == null))
     {
         IARCO capControlCasted = item.As <IARCO>();
         if ((capControlCasted != null))
         {
             this._parent.CapControl = capControlCasted;
             return;
         }
     }
 }