Beispiel #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)
            {
                IAllocationContext contextsCasted = item.As <IAllocationContext>();

                if ((contextsCasted != null))
                {
                    this._parent.Contexts.Add(contextsCasted);
                }
                if ((this._parent.AllocatedSystem == null))
                {
                    ISystem_MM06 allocatedSystemCasted = item.As <ISystem_MM06>();
                    if ((allocatedSystemCasted != null))
                    {
                        this._parent.AllocatedSystem = allocatedSystemCasted;
                        return;
                    }
                }
            }
Beispiel #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.System == null))
     {
         ISystem_MM06 systemCasted = item.As <ISystem_MM06>();
         if ((systemCasted != null))
         {
             this._parent.System = systemCasted;
             return;
         }
     }
     if ((this._parent.Repository == null))
     {
         IRepository_MM06 repositoryCasted = item.As <IRepository_MM06>();
         if ((repositoryCasted != null))
         {
             this._parent.Repository = repositoryCasted;
             return;
         }
     }
     if ((this._parent.Allocation == null))
     {
         IAllocation allocationCasted = item.As <IAllocation>();
         if ((allocationCasted != null))
         {
             this._parent.Allocation = allocationCasted;
             return;
         }
     }
     if ((this._parent.Environment == null))
     {
         IEnvironment_MM06 environmentCasted = item.As <IEnvironment_MM06>();
         if ((environmentCasted != null))
         {
             this._parent.Environment = environmentCasted;
             return;
         }
     }
 }