/// <summary>
        /// Return an XElement for XML generation.
        /// </summary>
        /// <param name="context">XML generation context.</param>
        internal XElement GetXElement(ExpressionXmlContext context)
        {
            var res = context.CheckElement(this, () =>
                                           new XElement(GetType( ).Name,
                                                        new XAttribute("resultType", ResultType?.ToString( ) ?? "null"),
                                                        context.CreateList("Arguments", Arguments, n => n.GetXElement(context))));

            if (res.Name == "Ref")
            {
                return(res);
            }

            if (InputType != null)
            {
                res.Add(new XAttribute("inputType", InputType));
            }

            OnGetXElement(res, context);
            return(res);
        }
Beispiel #2
0
 /// <summary>
 /// Override for class-specific XML generation.
 /// </summary>
 /// <param name="element">The element that represents this node, to which attributes and children should be added.</param>
 /// <param name="context">XML generation context.</param>
 protected override void OnGetXElement(XElement element, ExpressionXmlContext context)
 {
     element.Add(context.CreateList("ChildContainer", ChildContainer.ChildEntityNodes, n => n.GetXElement(context)));
 }