예제 #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)
            {
                IOverheadConductorInfo overheadConductorsCasted = item.As <IOverheadConductorInfo>();

                if ((overheadConductorsCasted != null))
                {
                    this._parent.OverheadConductors.Add(overheadConductorsCasted);
                }
                IMountingConnection connectionsCasted = item.As <IMountingConnection>();

                if ((connectionsCasted != null))
                {
                    this._parent.Connections.Add(connectionsCasted);
                }
            }
예제 #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)
            {
                IStructureSupportInfo structureSupportInfosCasted = item.As <IStructureSupportInfo>();

                if ((structureSupportInfosCasted != null))
                {
                    this._parent.StructureSupportInfos.Add(structureSupportInfosCasted);
                }
                IMountingConnection mountingConnectionsCasted = item.As <IMountingConnection>();

                if ((mountingConnectionsCasted != null))
                {
                    this._parent.MountingConnections.Add(mountingConnectionsCasted);
                }
            }
예제 #3
0
            /// <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)
            {
                IOverheadConductorInfo overheadConductorInfoItem = item.As <IOverheadConductorInfo>();

                if (((overheadConductorInfoItem != null) &&
                     this._parent.OverheadConductors.Remove(overheadConductorInfoItem)))
                {
                    return(true);
                }
                IMountingConnection mountingConnectionItem = item.As <IMountingConnection>();

                if (((mountingConnectionItem != null) &&
                     this._parent.Connections.Remove(mountingConnectionItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #4
0
            /// <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)
            {
                IStructureSupportInfo structureSupportInfoItem = item.As <IStructureSupportInfo>();

                if (((structureSupportInfoItem != null) &&
                     this._parent.StructureSupportInfos.Remove(structureSupportInfoItem)))
                {
                    return(true);
                }
                IMountingConnection mountingConnectionItem = item.As <IMountingConnection>();

                if (((mountingConnectionItem != null) &&
                     this._parent.MountingConnections.Remove(mountingConnectionItem)))
                {
                    return(true);
                }
                return(false);
            }