コード例 #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)
            {
                if ((this._parent.ValueAliasSet == null))
                {
                    IValueAliasSet valueAliasSetCasted = item.As <IValueAliasSet>();
                    if ((valueAliasSetCasted != null))
                    {
                        this._parent.ValueAliasSet = valueAliasSetCasted;
                        return;
                    }
                }
                if ((this._parent.Command == null))
                {
                    ICommand commandCasted = item.As <ICommand>();
                    if ((commandCasted != null))
                    {
                        this._parent.Command = commandCasted;
                        return;
                    }
                }
                IDiscreteValue discreteValuesCasted = item.As <IDiscreteValue>();

                if ((discreteValuesCasted != null))
                {
                    this._parent.DiscreteValues.Add(discreteValuesCasted);
                }
            }
コード例 #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.ValueAliasSet == null))
     {
         IValueAliasSet valueAliasSetCasted = item.As <IValueAliasSet>();
         if ((valueAliasSetCasted != null))
         {
             this._parent.ValueAliasSet = valueAliasSetCasted;
             return;
         }
     }
 }