示例#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)
            {
                IResourceContainer connectedResourceContainers_LinkingResourceCasted = item.As <IResourceContainer>();

                if ((connectedResourceContainers_LinkingResourceCasted != null))
                {
                    this._parent.ConnectedResourceContainers_LinkingResource.Add(connectedResourceContainers_LinkingResourceCasted);
                }
                if ((this._parent.CommunicationLinkResourceSpecifications_LinkingResource == null))
                {
                    ICommunicationLinkResourceSpecification communicationLinkResourceSpecifications_LinkingResourceCasted = item.As <ICommunicationLinkResourceSpecification>();
                    if ((communicationLinkResourceSpecifications_LinkingResourceCasted != null))
                    {
                        this._parent.CommunicationLinkResourceSpecifications_LinkingResource = communicationLinkResourceSpecifications_LinkingResourceCasted;
                        return;
                    }
                }
                if ((this._parent.ResourceEnvironment_LinkingResource == null))
                {
                    IResourceEnvironment resourceEnvironment_LinkingResourceCasted = item.As <IResourceEnvironment>();
                    if ((resourceEnvironment_LinkingResourceCasted != null))
                    {
                        this._parent.ResourceEnvironment_LinkingResource = resourceEnvironment_LinkingResourceCasted;
                        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.CommunicationLinkResourceSpecifications_LinkingResource == null))
     {
         ICommunicationLinkResourceSpecification communicationLinkResourceSpecifications_LinkingResourceCasted = item.As <ICommunicationLinkResourceSpecification>();
         if ((communicationLinkResourceSpecifications_LinkingResourceCasted != null))
         {
             this._parent.CommunicationLinkResourceSpecifications_LinkingResource = communicationLinkResourceSpecifications_LinkingResourceCasted;
             return;
         }
     }
 }