/// <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); }
/// <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); } }
/// <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); }
/// <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); }
/// <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; } } }
/// <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); } }
/// <summary> /// Gets the referenced value for a RequiredInterfaces of the enclosing ComponentType. /// </summary> public override IAssemblyContext GetRequiredInterfacesValue(IRequiredInterface reference) { return((IAssemblyContext)(this.GetReferencedElement(reference))); }
/// <summary> /// Gets a proxy for the referenced value for a RequiredInterfaces of the enclosing ComponentType. /// </summary> public abstract INotifyValue <IAssemblyContext> GetRequiredInterfacesProxy(IRequiredInterface reference);
public abstract IAssemblyContext GetRequiredInterfacesValue(IRequiredInterface reference);