System.Xml.Xsl.IlGen.XmlILVisitor.VisitXsltConvert C# (CSharp) Метод

VisitXsltConvert() защищенный Метод

Generate code for QilNodeType.XsltConvert.
protected VisitXsltConvert ( QilTargetType ndConv ) : QilNode
ndConv QilTargetType
Результат QilNode
        protected override QilNode VisitXsltConvert(QilTargetType ndConv) {
            XmlQueryType typSrc, typDst;
            MethodInfo meth;

            typSrc = ndConv.Source.XmlType;
            typDst = ndConv.TargetType;

            if (GetXsltConvertMethod(typSrc, typDst, out meth)) {
                NestedVisitEnsureStack(ndConv.Source);
            }
            else {
                // If a conversion could not be found, then convert the source expression to item or item* and try again
                NestedVisitEnsureStack(ndConv.Source, typeof(XPathItem), !typSrc.IsSingleton);
                if (!GetXsltConvertMethod(typSrc.IsSingleton ? TypeFactory.Item : TypeFactory.ItemS, typDst, out meth))
                    Debug.Fail("Conversion from " + ndConv.Source.XmlType + " to " + ndConv.TargetType + " is not supported.");
            }

            // XsltConvert.XXXToYYY(value);
            if (meth != null)
                this.helper.Call(meth);

            this.iterCurr.Storage = StorageDescriptor.Stack(GetItemStorageType(typDst), !typDst.IsSingleton);
            return ndConv;
        }
XmlILVisitor