Пример #1
0
        public override void deserializeFromMocaTree(Serialization.MocaTree.MocaNode actNode)
        {
            MocaAttribute guidAttr     = actNode.getAttributeOrCreate(Main.GuidStringName);
            MocaAttribute typeGuidAttr = actNode.getAttributeOrCreate("typeGuid");

            this.typeGuid   = typeGuidAttr.Value;
            this.guid       = actNode.getAttributeOrCreate(Main.GuidStringName).Value;
            this.returnType = actNode.getAttributeOrCreate("returnType").Value;
            this.Name       = actNode.getAttributeOrCreate("name").Value;
            MocaNode parametersNode = actNode.getChildNodeWithName(EOperation.ParametersChildNodeName);

            foreach (MocaNode eParamNode in parametersNode.Children)
            {
                if (eParamNode.Name == "EParameter")
                {
                    foreach (SQLParameter neededParam in this.EaMethod.Parameters)
                    {
                        if (neededParam.Name == eParamNode.getAttributeOrCreate("name").Value)
                        {
                            EParameter eParam = new EParameter(neededParam, Repository);
                            eParam.deserializeFromMocaTree(eParamNode);
                            this.EParameters.Add(eParam);
                        }
                    }
                }
            }

            //only for import purposes
        }
Пример #2
0
        public void computeAttributes()
        {
            this.EParameters = new List <EParameter>();
            this.returnType  = EaMethod.ReturnType;
            foreach (SQLParameter parameter in EaMethod.Parameters)
            {
                EParameter eParameter = new EParameter(parameter, Repository);
                EParameters.Add(eParameter);
            }

            if (this.EaMethod.ClassifierID != "0" && this.EaMethod.ClassifierID != "")
            {
                try
                {
                    SQLElement classifier = Repository.GetElementByID(int.Parse(this.EaMethod.ClassifierID));
                    this.typeGuid = classifier.ElementGUID;
                }
                catch
                {
                }
            }
        }