コード例 #1
0
        private CoreOperation createOperation(XNamespace xnamespace, CoreNamespace ownerNamespace, CoreModelElement owner, XElement xoperation)
        {
            CoreOperation coreOperation = new CoreOperationImpl();

            coreOperation.setName(xoperation.Attribute("name").Value);
            coreOperation.setElemOwner(owner);
            updateElemOwnedElements(owner, coreOperation);
            coreOperation.setNamespace(ownerNamespace);
            updateNamespaceElemOwnedElements(ownerNamespace, coreOperation);

            //coreOperation.setOwnerScope(getScopeKind(xoperation.Attribute("ownerScope").Value));

            var xparameters = xoperation.Descendants(xnamespace + "parameter");

            foreach (var xparameter in xparameters)
            {
                createParameter(xnamespace, ownerNamespace, coreOperation, xparameter);
            }

            var isQuery = xoperation.Attribute("isQuery").Value;

            coreOperation.setIsQuery(bool.Parse(isQuery));

            lookup.Add(xoperation.Attribute("Id").Value, coreOperation);

            return(coreOperation);
        }