コード例 #1
0
        private static DslModeling::ElementLink ConnectOperationToServiceContract(Operation sourceBeforePathTraverse, ServiceContract targetBeforePathTraverse)
        {
            DslModeling::ElementLink result = new ServiceContractReferencesOperations(targetBeforePathTraverse, sourceBeforePathTraverse);

            SetUniqueName(result);

            sourceBeforePathTraverse.Action = Operation.BuildDefaultAction(sourceBeforePathTraverse);

            return(result);
        }
コード例 #2
0
 public override void ElementPropertyChanged(ElementPropertyChangedEventArgs e)
 {
     if (e.DomainProperty.Id == Operation.NameDomainPropertyId)
     {
         Operation operation = e.ModelElement as Operation;
         string    oldValue  = e.OldValue.ToString();
         if (oldValue != string.Empty &&
             operation.Action.EndsWith(oldValue, StringComparison.OrdinalIgnoreCase))
         {
             operation.Action = Operation.BuildDefaultAction(operation);
         }
     }
 }
コード例 #3
0
        public override void ElementAdded(ElementAddedEventArgs e)
        {
            Operation            operation = e.ModelElement as Operation;
            ServiceContractModel root      = operation.ServiceContractModel;

            if (root != null && root.ImplementationTechnology != null)
            {
                ExtensionProviderHelper.AttachObjectExtender(operation, root.ImplementationTechnology);
            }

            if (String.IsNullOrEmpty(operation.Action))
            {
                operation.Action = Operation.BuildDefaultAction(operation);
            }
        }