/// <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())); }
public object GetAttributeValue(Meta.IAttribute attribute, int index = 0) { if (attribute == null) { throw new ArgumentOutOfRangeException("attribute"); } return(GetAttributeValue(attribute.Name.ToUpperInvariant(), index)); }
/// <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); }
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(); }
/// <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"); }