コード例 #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.ControlArea == null))
                {
                    IControlArea controlAreaCasted = item.As <IControlArea>();
                    if ((controlAreaCasted != null))
                    {
                        this._parent.ControlArea = controlAreaCasted;
                        return;
                    }
                }
                IAltGeneratingUnitMeas altGeneratingUnitMeasCasted = item.As <IAltGeneratingUnitMeas>();

                if ((altGeneratingUnitMeasCasted != null))
                {
                    this._parent.AltGeneratingUnitMeas.Add(altGeneratingUnitMeasCasted);
                }
                if ((this._parent.GeneratingUnit == null))
                {
                    IGeneratingUnit generatingUnitCasted = item.As <IGeneratingUnit>();
                    if ((generatingUnitCasted != null))
                    {
                        this._parent.GeneratingUnit = generatingUnitCasted;
                        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.Terminal == null))
                {
                    ITerminal terminalCasted = item.As <ITerminal>();
                    if ((terminalCasted != null))
                    {
                        this._parent.Terminal = terminalCasted;
                        return;
                    }
                }
                IAltTieMeas altTieMeasCasted = item.As <IAltTieMeas>();

                if ((altTieMeasCasted != null))
                {
                    this._parent.AltTieMeas.Add(altTieMeasCasted);
                }
                if ((this._parent.ControlArea == null))
                {
                    IControlArea controlAreaCasted = item.As <IControlArea>();
                    if ((controlAreaCasted != null))
                    {
                        this._parent.ControlArea = controlAreaCasted;
                        return;
                    }
                }
            }
コード例 #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.ControlArea == null))
     {
         IControlArea controlAreaCasted = item.As <IControlArea>();
         if ((controlAreaCasted != null))
         {
             this._parent.ControlArea = controlAreaCasted;
             return;
         }
     }
 }
コード例 #4
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 TypeProxy(IControlArea modelElement) :
     base(modelElement, "type")
 {
 }