Beispiel #1
0
        private OperationCall CreateOperationCall(BubbledChangeEventArgs e)
        {
            var original = e.OriginalEventArgs as OperationCallEventArgs;
            var opCall   = new OperationCall
            {
                Operation     = original.Operation,
                TargetElement = original.Target
            };
            var index = 0;

            foreach (var par in original.Operation.Parameters)
            {
                var rType = par.Type as IReferenceType;
                if (rType == null)
                {
                    opCall.Arguments.Add(new ValueArgument
                    {
                        Name  = par.Name,
                        Value = par.Type.Serialize(original.Arguments[index])
                    });
                }
                else
                {
                    opCall.Arguments.Add(new ReferenceArgument
                    {
                        Name  = par.Name,
                        Value = (IModelElement)original.Arguments[index]
                    });
                }
                index++;
            }
            return(opCall);
        }
Beispiel #2
0
 /// <summary>
 /// Creates a new instance
 /// </summary>
 public OperationCallReferencedElementsCollection(OperationCall parent)
 {
     this._parent = parent;
 }