Пример #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.C1 == null))
     {
         ICMV c1Casted = item.As <ICMV>();
         if ((c1Casted != null))
         {
             this._parent.C1 = c1Casted;
             return;
         }
     }
     if ((this._parent.C2 == null))
     {
         ICMV c2Casted = item.As <ICMV>();
         if ((c2Casted != null))
         {
             this._parent.C2 = c2Casted;
             return;
         }
     }
     if ((this._parent.C3 == null))
     {
         ICMV c3Casted = item.As <ICMV>();
         if ((c3Casted != null))
         {
             this._parent.C3 = c3Casted;
             return;
         }
     }
     if ((this._parent.SeqT == null))
     {
         ISequence seqTCasted = item.As <ISequence>();
         if ((seqTCasted != null))
         {
             this._parent.SeqT = seqTCasted;
             return;
         }
     }
     if ((this._parent.PhsRef == null))
     {
         IPhaseReference phsRefCasted = item.As <IPhaseReference>();
         if ((phsRefCasted != null))
         {
             this._parent.PhsRef = phsRefCasted;
             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(IPhaseReference modelElement) :
     base(modelElement, "val")
 {
 }