Beispiel #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.Receipt == null))
     {
         IReceipt receiptCasted = item.As <IReceipt>();
         if ((receiptCasted != null))
         {
             this._parent.Receipt = receiptCasted;
             return;
         }
     }
     if ((this._parent.Cheque == null))
     {
         ICheque chequeCasted = item.As <ICheque>();
         if ((chequeCasted != null))
         {
             this._parent.Cheque = chequeCasted;
             return;
         }
     }
     if ((this._parent.Card == null))
     {
         ICard cardCasted = item.As <ICard>();
         if ((cardCasted != null))
         {
             this._parent.Card = cardCasted;
             return;
         }
     }
 }
Beispiel #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 KindProxy(ICheque modelElement) :
     base(modelElement, "kind")
 {
 }