protected override QilNode VisitRtfCtor(QilBinary ndRtf) {
OptimizerPatterns patt = OptimizerPatterns.Read(ndRtf);
string baseUri = (string) (QilLiteral) ndRtf.Right;
if (patt.MatchesPattern(OptimizerPatternName.SingleTextRtf)) {
// Special-case Rtf containing a root node and a single text node child
this.helper.LoadQueryRuntime();
NestedVisitEnsureStack((QilNode) patt.GetArgument(OptimizerPatternArgument.RtfText));
this.helper.Emit(OpCodes.Ldstr, baseUri);
this.helper.Call(XmlILMethods.RtfConstr);
}
else {
// Start nested construction of an Rtf
this.helper.CallStartRtfConstruction(baseUri);
// Write content of Rtf to writer
NestedVisit(ndRtf.Left);
// Get the result Rtf
this.helper.CallEndRtfConstruction();
}
this.iterCurr.Storage = StorageDescriptor.Stack(typeof(XPathNavigator), false);
return ndRtf;
}