Пример #1
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(NMF.Models.IModelElement item)
            {
                IRequiredInterface requiredInterfaceItem = item.As <IRequiredInterface>();

                if (((requiredInterfaceItem != null) &&
                     this._parent.RequiredInterfaces.Remove(requiredInterfaceItem)))
                {
                    return(true);
                }
                IInterface interfaceItem = item.As <IInterface>();

                if (((interfaceItem != null) &&
                     this._parent.ProvidedInterfaces.Remove(interfaceItem)))
                {
                    return(true);
                }
                IService serviceItem = item.As <IService>();

                if (((serviceItem != null) &&
                     this._parent.Services.Remove(serviceItem)))
                {
                    return(true);
                }
                if ((this._parent.Repository == item))
                {
                    this._parent.Repository = null;
                    return(true);
                }
                return(false);
            }
Пример #2
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(NMF.Models.IModelElement item)
            {
                IRequiredInterface requiredInterfacesCasted = item.As <IRequiredInterface>();

                if ((requiredInterfacesCasted != null))
                {
                    this._parent.RequiredInterfaces.Add(requiredInterfacesCasted);
                }
                IInterface providedInterfacesCasted = item.As <IInterface>();

                if ((providedInterfacesCasted != null))
                {
                    this._parent.ProvidedInterfaces.Add(providedInterfacesCasted);
                }
                IService servicesCasted = item.As <IService>();

                if ((servicesCasted != null))
                {
                    this._parent.Services.Add(servicesCasted);
                }
                if ((this._parent.Repository == null))
                {
                    IRepository repositoryCasted = item.As <IRepository>();
                    if ((repositoryCasted != null))
                    {
                        this._parent.Repository = repositoryCasted;
                        return;
                    }
                }
            }
        /// <summary>
        /// Adds the given element to the collection
        /// </summary>
        /// <param name="item">The item to add</param>
        public virtual void Add(NMF.Models.Meta.IReference item)
        {
            IRequiredInterface requiredInterfacesCasted = item.As <IRequiredInterface>();

            if ((requiredInterfacesCasted != null))
            {
                this._parent.RequiredInterfaces.Add(requiredInterfacesCasted);
            }
        }
Пример #4
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(NMF.Models.IModelElement item)
            {
                IRequiredInterface publicInterfacesCasted = item.As <IRequiredInterface>();

                if ((publicInterfacesCasted != null))
                {
                    this._parent.PublicInterfaces.Add(publicInterfacesCasted);
                }
            }
        /// <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 virtual bool Remove(NMF.Models.Meta.IReference item)
        {
            IRequiredInterface requiredInterfaceItem = item.As <IRequiredInterface>();

            if (((requiredInterfaceItem != null) &&
                 this._parent.RequiredInterfaces.Remove(requiredInterfaceItem)))
            {
                return(true);
            }
            return(false);
        }
Пример #6
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(NMF.Models.IModelElement item)
            {
                IRequiredInterface requiredInterfaceItem = item.As <IRequiredInterface>();

                if (((requiredInterfaceItem != null) &&
                     this._parent.PublicInterfaces.Remove(requiredInterfaceItem)))
                {
                    return(true);
                }
                return(false);
            }
Пример #7
0
 /// <summary>
 /// Gets the referenced value for a RequiredInterfaces of the enclosing ComponentType.
 /// </summary>
 public override INotifyValue <IAssemblyContext> GetRequiredInterfacesProxy(IRequiredInterface reference)
 {
     if ((reference == null))
     {
         throw new System.ArgumentOutOfRangeException("reference");
     }
     if ((reference.UpperBound == 1))
     {
         return(Observable.As <IModelElement, IAssemblyContext>(this.GetExpressionForReference(reference.Name.ToUpperInvariant())));
     }
     throw new NotSupportedException();
 }
 /// <summary>
 /// Adds the given element to the collection
 /// </summary>
 /// <param name="item">The item to add</param>
 public override void Add(NMF.Models.IModelElement item)
 {
     if ((this._parent.Port == null))
     {
         IRequiredInterface portCasted = item.As <IRequiredInterface>();
         if ((portCasted != null))
         {
             this._parent.Port = portCasted;
             return;
         }
     }
 }
Пример #9
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(NMF.Models.IModelElement item)
            {
                IRequiredInterface requiredInterfacesCasted = item.As <IRequiredInterface>();

                if ((requiredInterfacesCasted != null))
                {
                    this._parent.RequiredInterfaces.Add(requiredInterfacesCasted);
                }
                IService servicesCasted = item.As <IService>();

                if ((servicesCasted != null))
                {
                    this._parent.Services.Add(servicesCasted);
                }
            }
Пример #10
0
 /// <summary>
 /// Gets the referenced value for a RequiredInterfaces of the enclosing ComponentType.
 /// </summary>
 public override IAssemblyContext GetRequiredInterfacesValue(IRequiredInterface reference)
 {
     return((IAssemblyContext)(this.GetReferencedElement(reference)));
 }
Пример #11
0
 /// <summary>
 /// Gets a proxy for the referenced value for a RequiredInterfaces of the enclosing ComponentType.
 /// </summary>
 public abstract INotifyValue <IAssemblyContext> GetRequiredInterfacesProxy(IRequiredInterface reference);
Пример #12
0
 public abstract IAssemblyContext GetRequiredInterfacesValue(IRequiredInterface reference);