Ejemplo n.º 1
0
 /// <summary>
 /// Gets the values for the given attribute
 /// </summary>
 /// <param name="attribute">The attribute whose value is queried</param>
 /// <returns>The attribute value collection</returns>
 public IList GetAttributeValues(Meta.IAttribute attribute)
 {
     if (attribute == null)
     {
         throw new ArgumentOutOfRangeException("attribute");
     }
     return(GetCollectionForFeature(attribute.Name.ToUpperInvariant()));
 }
Ejemplo n.º 2
0
 public object GetAttributeValue(Meta.IAttribute attribute, int index = 0)
 {
     if (attribute == null)
     {
         throw new ArgumentOutOfRangeException("attribute");
     }
     return(GetAttributeValue(attribute.Name.ToUpperInvariant(), index));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Sets the value of the current model element for the given attribute
 /// </summary>
 /// <param name="attribute">The attribute</param>
 /// <param name="value">The value that should be set</param>
 public void SetAttributeValue(Meta.IAttribute attribute, object value)
 {
     if (attribute == null)
     {
         throw new ArgumentOutOfRangeException("attribute");
     }
     SetFeature(attribute.Name.ToUpperInvariant(), value);
 }
Ejemplo n.º 4
0
 public static INotifyExpression <object> GetAttributeValue(ModelElement element, Meta.IAttribute attribute, int index)
 {
     if (attribute == null)
     {
         throw new ArgumentOutOfRangeException("attribute");
     }
     if (attribute.UpperBound == 1)
     {
         return(element.GetExpressionForAttribute(attribute.Name.ToUpperInvariant()));
     }
     throw new NotSupportedException();
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Gets the value for the given attribute
 /// </summary>
 /// <param name="attribute">The attribute whose value is queried</param>
 /// <returns>The attribute value</returns>
 public virtual object GetAttributeValue(Meta.IAttribute attribute)
 {
     throw new ArgumentOutOfRangeException("attribute");
 }