예제 #1
0
파일: Repository.cs 프로젝트: lukeIam/NMF
            /// <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)
            {
                IRepositoryComponent repositoryComponentItem = item.As <IRepositoryComponent>();

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

                if (((interfaceItem != null) &&
                     this._parent.Interfaces__Repository.Remove(interfaceItem)))
                {
                    return(true);
                }
                IFailureType failureTypeItem = item.As <IFailureType>();

                if (((failureTypeItem != null) &&
                     this._parent.FailureTypes__Repository.Remove(failureTypeItem)))
                {
                    return(true);
                }
                IDataType dataTypeItem = item.As <IDataType>();

                if (((dataTypeItem != null) &&
                     this._parent.DataTypes__Repository.Remove(dataTypeItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #2
0
파일: Repository.cs 프로젝트: lukeIam/NMF
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IRepositoryComponent components__RepositoryCasted = item.As <IRepositoryComponent>();

                if ((components__RepositoryCasted != null))
                {
                    this._parent.Components__Repository.Add(components__RepositoryCasted);
                }
                IInterface interfaces__RepositoryCasted = item.As <IInterface>();

                if ((interfaces__RepositoryCasted != null))
                {
                    this._parent.Interfaces__Repository.Add(interfaces__RepositoryCasted);
                }
                IFailureType failureTypes__RepositoryCasted = item.As <IFailureType>();

                if ((failureTypes__RepositoryCasted != null))
                {
                    this._parent.FailureTypes__Repository.Add(failureTypes__RepositoryCasted);
                }
                IDataType dataTypes__RepositoryCasted = item.As <IDataType>();

                if ((dataTypes__RepositoryCasted != null))
                {
                    this._parent.DataTypes__Repository.Add(dataTypes__RepositoryCasted);
                }
            }
예제 #3
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IFailureType failureTypes_FailureHandlingEntityCasted = item.As <IFailureType>();

                if ((failureTypes_FailureHandlingEntityCasted != null))
                {
                    this._parent.FailureTypes_FailureHandlingEntity.Add(failureTypes_FailureHandlingEntityCasted);
                }
            }
예제 #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)
            {
                IFailureType failureTypeItem = item.As <IFailureType>();

                if (((failureTypeItem != null) &&
                     this._parent.FailureTypes_FailureHandlingEntity.Remove(failureTypeItem)))
                {
                    return(true);
                }
                return(false);
            }
예제 #5
0
            /// <summary>
            /// Adds the given element to the collection
            /// </summary>
            /// <param name="item">The item to add</param>
            public override void Add(IModelElement item)
            {
                IExceptionType exceptions__SignatureCasted = item.As <IExceptionType>();

                if ((exceptions__SignatureCasted != null))
                {
                    this._parent.Exceptions__Signature.Add(exceptions__SignatureCasted);
                }
                IFailureType failureTypeCasted = item.As <IFailureType>();

                if ((failureTypeCasted != null))
                {
                    this._parent.FailureType.Add(failureTypeCasted);
                }
            }
예제 #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(IModelElement item)
            {
                IExceptionType exceptionTypeItem = item.As <IExceptionType>();

                if (((exceptionTypeItem != null) &&
                     this._parent.Exceptions__Signature.Remove(exceptionTypeItem)))
                {
                    return(true);
                }
                IFailureType failureTypeItem = item.As <IFailureType>();

                if (((failureTypeItem != null) &&
                     this._parent.FailureType.Remove(failureTypeItem)))
                {
                    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(IModelElement item)
 {
     if ((this._parent.SpecifiedReliabilityAnnotation__ExternalFailureOccurrenceDescription == null))
     {
         ISpecifiedReliabilityAnnotation specifiedReliabilityAnnotation__ExternalFailureOccurrenceDescriptionCasted = item.As <ISpecifiedReliabilityAnnotation>();
         if ((specifiedReliabilityAnnotation__ExternalFailureOccurrenceDescriptionCasted != null))
         {
             this._parent.SpecifiedReliabilityAnnotation__ExternalFailureOccurrenceDescription = specifiedReliabilityAnnotation__ExternalFailureOccurrenceDescriptionCasted;
             return;
         }
     }
     if ((this._parent.FailureType__ExternalFailureOccurrenceDescription == null))
     {
         IFailureType failureType__ExternalFailureOccurrenceDescriptionCasted = item.As <IFailureType>();
         if ((failureType__ExternalFailureOccurrenceDescriptionCasted != null))
         {
             this._parent.FailureType__ExternalFailureOccurrenceDescription = failureType__ExternalFailureOccurrenceDescriptionCasted;
             return;
         }
     }
 }