Atl2NmfSBenchmark/Metamodels/Ant.cs
/// <summary>
/// Adds the given element to the collection
/// </summary>
/// <param name="item">The item to add</param>
Adds the given element to the collection
Adds the given element to the collection
public override void Add(IModelElement item)
            {
                if ((this._parent.Default == null))
                {
                    ITarget defaultCasted = item.As<ITarget>();
                    if ((defaultCasted != null))
                    {
                        this._parent.Default = defaultCasted;
                        return;
                    }
                }
                if ((this._parent.PathMember == null))
                {
                    IPath pathMemberCasted = item.As<IPath>();
                    if ((pathMemberCasted != null))
                    {
                        this._parent.PathMember = pathMemberCasted;
                        return;
                    }
                }
                IProperty propertiesCasted = item.As<IProperty>();
                if ((propertiesCasted != null))
                {
                    this._parent.Properties.Add(propertiesCasted);
                }
                ITaskDef taskdefCasted = item.As<ITaskDef>();
                if ((taskdefCasted != null))
                {
                    this._parent.Taskdef.Add(taskdefCasted);
                }
                ITarget targetsCasted = item.As<ITarget>();
                if ((targetsCasted != null))
                {
                    this._parent.Targets.Add(targetsCasted);
                }
            }
public override void Add ( IModelElement item ) { if ( ( this . _parent . Default == null ) ) { ITarget defaultCasted = item . As < ITarget > ( ) ; if ( ( defaultCasted != null ) ) { this . _parent . Default = defaultCasted ; return ; } } if ( ( this . _parent . PathMember == null ) ) { IPath pathMemberCasted = item . As < IPath > ( ) ; if ( ( pathMemberCasted != null ) ) { this . _parent . PathMember = pathMemberCasted ; return ; } } IProperty propertiesCasted = item . As < IProperty > ( ) ; if ( ( propertiesCasted != null ) ) { this . _parent . Properties . Add ( propertiesCasted ) ; } ITaskDef taskdefCasted = item . As < ITaskDef > ( ) ; if ( ( taskdefCasted != null ) ) { this . _parent . Taskdef . Add ( taskdefCasted ) ; } ITarget targetsCasted = item . As < ITarget > ( ) ; if ( ( targetsCasted != null ) ) { this . _parent . Targets . Add ( targetsCasted ) ; } }
Adds the given element to the collection
Adds the given element to the collection
item
IModelElement
The item to add
The item to add