Beispiel #1
0
 public IModelElement GetReferencedElement(Meta.IReference reference, int index = 0)
 {
     if (reference == null)
     {
         throw new ArgumentNullException("reference");
     }
     return(GetModelElementForReference(reference.Name.ToUpperInvariant(), 0));
 }
Beispiel #2
0
 /// <summary>
 /// Sets the referenced element of the current model element for the given reference
 /// </summary>
 /// <param name="reference">The reference</param>
 /// <param name="element">The element that should be set</param>
 public void SetReferencedElement(Meta.IReference reference, IModelElement element)
 {
     if (reference == null)
     {
         throw new ArgumentNullException("reference");
     }
     SetFeature(reference.Name.ToUpperInvariant(), element);
 }
Beispiel #3
0
 public static INotifyExpression <IModelElement> GetReferencedElement(ModelElement element, Meta.IReference reference, int index)
 {
     if (reference == null)
     {
         throw new ArgumentOutOfRangeException("reference");
     }
     if (reference.UpperBound == 1)
     {
         return(element.GetExpressionForReference(reference.Name.ToUpperInvariant()));
     }
     throw new NotSupportedException();
 }
Beispiel #4
0
 /// <summary>
 /// Gets the referenced elements of the current model element for the given reference
 /// </summary>
 /// <param name="reference">The reference</param>
 /// <returns>A collection of referenced elements</returns>
 public IList GetReferencedElements(Meta.IReference reference)
 {
     return(GetCollectionForFeature(reference.Name.ToUpperInvariant()));
 }
Beispiel #5
0
 /// <summary>
 /// Gets the referenced elements of the current model element for the given reference
 /// </summary>
 /// <param name="reference">The reference</param>
 /// <returns>A collection of referenced elements</returns>
 public IList GetReferencedElements(Meta.IReference reference)
 {
     throw new ArgumentOutOfRangeException("reference");
 }