/// <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.PlannedOutage == null)) { IPlannedOutage plannedOutageCasted = item.As <IPlannedOutage>(); if ((plannedOutageCasted != null)) { this._parent.PlannedOutage = plannedOutageCasted; return; } } if ((this._parent.PowerSystemResource == null)) { IPowerSystemResource powerSystemResourceCasted = item.As <IPowerSystemResource>(); if ((powerSystemResourceCasted != null)) { this._parent.PowerSystemResource = powerSystemResourceCasted; return; } } ISwitchingOperation switchingOperationsCasted = item.As <ISwitchingOperation>(); if ((switchingOperationsCasted != null)) { this._parent.SwitchingOperations.Add(switchingOperationsCasted); } }
/// <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(IPlannedOutage modelElement) : base(modelElement, "kind") { }