Exemple #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(IModelElement item)
            {
                ILandProperty landPropertyItem = item.As <ILandProperty>();

                if (((landPropertyItem != null) &&
                     this._parent.LandProperties.Remove(landPropertyItem)))
                {
                    return(true);
                }
                IAsset assetItem = item.As <IAsset>();

                if (((assetItem != null) &&
                     this._parent.Assets.Remove(assetItem)))
                {
                    return(true);
                }
                ISeal sealItem = item.As <ISeal>();

                if (((sealItem != null) &&
                     this._parent.Seals.Remove(sealItem)))
                {
                    return(true);
                }
                return(false);
            }
Exemple #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)
            {
                ILandProperty landPropertiesCasted = item.As <ILandProperty>();

                if ((landPropertiesCasted != null))
                {
                    this._parent.LandProperties.Add(landPropertiesCasted);
                }
                IAsset assetsCasted = item.As <IAsset>();

                if ((assetsCasted != null))
                {
                    this._parent.Assets.Add(assetsCasted);
                }
                ISeal sealsCasted = item.As <ISeal>();

                if ((sealsCasted != null))
                {
                    this._parent.Seals.Add(sealsCasted);
                }
            }
Exemple #3
0
 public void SetSeal(ISeal seal)
 {
     Seal = seal;
 }
Exemple #4
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public KindProxy(ISeal modelElement) :
     base(modelElement, "kind")
 {
 }
Exemple #5
0
 /// <summary>
 /// Creates a new observable property access proxy
 /// </summary>
 /// <param name="modelElement">The model instance element for which to create the property access proxy</param>
 public ConditionProxy(ISeal modelElement) :
     base(modelElement, "condition")
 {
 }
Exemple #6
0
 public SealController()
 {
     Seal = new Seal();
 }