/// <summary> /// Removes the given item from the collection /// </summary> /// <returns>True, if the item was removed, otherwise False</returns> /// <param name="item">The item that should be removed</param> public override bool Remove(IModelElement item) { IBushingInsulationPF bushingInsulationPFItem = item.As <IBushingInsulationPF>(); if (((bushingInsulationPFItem != null) && this._parent.BushingInsulationPFs.Remove(bushingInsulationPFItem))) { return(true); } if ((this._parent.Terminal == item)) { this._parent.Terminal = null; return(true); } return(false); }
/// <summary> /// Adds the given element to the collection /// </summary> /// <param name="item">The item to add</param> public override void Add(IModelElement item) { IBushingInsulationPF bushingInsulationPFsCasted = item.As <IBushingInsulationPF>(); if ((bushingInsulationPFsCasted != null)) { this._parent.BushingInsulationPFs.Add(bushingInsulationPFsCasted); } if ((this._parent.Terminal == null)) { ITerminal terminalCasted = item.As <ITerminal>(); if ((terminalCasted != null)) { this._parent.Terminal = terminalCasted; return; } } }
/// <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 TestKindProxy(IBushingInsulationPF modelElement) : base(modelElement, "testKind") { }