コード例 #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.PhsAB == null))
     {
         ICMV phsABCasted = item.As <ICMV>();
         if ((phsABCasted != null))
         {
             this._parent.PhsAB = phsABCasted;
             return;
         }
     }
     if ((this._parent.PhsBC == null))
     {
         ICMV phsBCCasted = item.As <ICMV>();
         if ((phsBCCasted != null))
         {
             this._parent.PhsBC = phsBCCasted;
             return;
         }
     }
     if ((this._parent.PhsCA == null))
     {
         ICMV phsCACasted = item.As <ICMV>();
         if ((phsCACasted != null))
         {
             this._parent.PhsCA = phsCACasted;
             return;
         }
     }
     if ((this._parent.AngRef == null))
     {
         IAngleReference angRefCasted = item.As <IAngleReference>();
         if ((angRefCasted != null))
         {
             this._parent.AngRef = angRefCasted;
             return;
         }
     }
 }
コード例 #2
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 ValProxy(IAngleReference modelElement) :
     base(modelElement, "val")
 {
 }
コード例 #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.PhsA == null))
     {
         ICMV phsACasted = item.As <ICMV>();
         if ((phsACasted != null))
         {
             this._parent.PhsA = phsACasted;
             return;
         }
     }
     if ((this._parent.PhsB == null))
     {
         ICMV phsBCasted = item.As <ICMV>();
         if ((phsBCasted != null))
         {
             this._parent.PhsB = phsBCasted;
             return;
         }
     }
     if ((this._parent.PhsC == null))
     {
         ICMV phsCCasted = item.As <ICMV>();
         if ((phsCCasted != null))
         {
             this._parent.PhsC = phsCCasted;
             return;
         }
     }
     if ((this._parent.Neut == null))
     {
         ICMV neutCasted = item.As <ICMV>();
         if ((neutCasted != null))
         {
             this._parent.Neut = neutCasted;
             return;
         }
     }
     if ((this._parent.Net == null))
     {
         ICMV netCasted = item.As <ICMV>();
         if ((netCasted != null))
         {
             this._parent.Net = netCasted;
             return;
         }
     }
     if ((this._parent.Res == null))
     {
         ICMV resCasted = item.As <ICMV>();
         if ((resCasted != null))
         {
             this._parent.Res = resCasted;
             return;
         }
     }
     if ((this._parent.AngRef == null))
     {
         IAngleReference angRefCasted = item.As <IAngleReference>();
         if ((angRefCasted != null))
         {
             this._parent.AngRef = angRefCasted;
             return;
         }
     }
 }