예제 #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.SwitchControl == null))
     {
         ICSWI switchControlCasted = item.As <ICSWI>();
         if ((switchControlCasted != null))
         {
             this._parent.SwitchControl = switchControlCasted;
             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.SumSwARs == null))
     {
         IBCR sumSwARsCasted = item.As <IBCR>();
         if ((sumSwARsCasted != null))
         {
             this._parent.SumSwARs = sumSwARsCasted;
             return;
         }
     }
     if ((this._parent.CBOpCap == null))
     {
         IINS cBOpCapCasted = item.As <IINS>();
         if ((cBOpCapCasted != null))
         {
             this._parent.CBOpCap = cBOpCapCasted;
             return;
         }
     }
     if ((this._parent.MaxOpCap == null))
     {
         IINS maxOpCapCasted = item.As <IINS>();
         if ((maxOpCapCasted != null))
         {
             this._parent.MaxOpCap = maxOpCapCasted;
             return;
         }
     }
     if ((this._parent.SwitchControl == null))
     {
         ICSWI switchControlCasted = item.As <ICSWI>();
         if ((switchControlCasted != null))
         {
             this._parent.SwitchControl = switchControlCasted;
             return;
         }
     }
 }