示例#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.BushingInfo == null))
     {
         IBushingInfo bushingInfoCasted = item.As <IBushingInfo>();
         if ((bushingInfoCasted != null))
         {
             this._parent.BushingInfo = bushingInfoCasted;
             return;
         }
     }
     if ((this._parent.Status == null))
     {
         IStatus statusCasted = item.As <IStatus>();
         if ((statusCasted != null))
         {
             this._parent.Status = statusCasted;
             return;
         }
     }
     if ((this._parent.TransformerObservation == null))
     {
         ITransformerObservation transformerObservationCasted = item.As <ITransformerObservation>();
         if ((transformerObservationCasted != null))
         {
             this._parent.TransformerObservation = transformerObservationCasted;
             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 InsulationKindProxy(IBushingInfo modelElement) :
     base(modelElement, "insulationKind")
 {
 }