コード例 #1
0
 public EntityOperationParam(EntityOperation owner)
     : base(owner)
 {
     this.Type           = Model.Types.FindType(new QualName("void", ""));
     this.IsRaw          = false;
     this.IsRef          = false;
     this.IsOut          = false;
     this.TypeDefinition = new TypeDefinition()
     {
         Required = true
     };
 }
コード例 #2
0
        public EntityOperationParam(EntityOperation owner, XmlNode node)
            : base(owner, node)
        {
            typeName  = new QualName(Utils.Xml.GetAttrValue(node, "type"), owner.Model.DefaultSchema);
            this.Type = Model.Types.FindType(typeName);
            if (this.Type == null)
            {
                throw new GlException("Type \"{0}\" not found. Entity: {1}. Operation: {2}",
                                      typeName, owner.Owner.FullName, owner.Name);
            }
            this.IsRaw = bool.Parse(Utils.Xml.GetAttrValue(node, "raw"));
            this.IsRef = bool.Parse(Utils.Xml.GetAttrValue(node, "ref"));
            this.IsOut = bool.Parse(Utils.Xml.GetAttrValue(node, "out"));

            this.TypeDefinition = new TypeDefinition(node);
            if (!this.TypeDefinition.HasRequired)
            {
                this.TypeDefinition.Required = true;
            }
        }
コード例 #3
0
        public EntityOperationParams(EntityOperation owner, XmlNode operationNode)
            : this(owner)
        {
            foreach (XmlNode paramNode in owner.Model.QueryNode(operationNode, "./{0}:Param"))
            {
                EntityOperationParam param = new EntityOperationParam(owner, paramNode);
                this.Add(param);
            }

            this.Returns = new EntityOperationReturn(owner);
            XmlNodeList returnsNodes = owner.Model.QueryNode(operationNode, "./{0}:Returns");
            if (returnsNodes.Count > 1)
            {
                throw new GlException("{0} has more than one returns", owner.ToString());
            }
            if (returnsNodes.Count == 1)
            {
                this.Returns = new EntityOperationReturn(owner, returnsNodes[0]);
            }
        }
コード例 #4
0
 public EntityOperationParams(EntityOperation owner)
     : base(owner.Model)
 {
     this.Operation = owner;
     this.Returns   = new EntityOperationReturn(owner);
 }
コード例 #5
0
 public EntityOperationReturn(EntityOperation owner, XmlNode node)
     : base(owner, node)
 {
     this.Name = ParamName;
 }
コード例 #6
0
 public EntityOperationReturn(EntityOperation owner)
     : base(owner)
 {
     this.Name = ParamName;
     this.Type = owner.Model.Types.GetByName("void", true, this);
 }