View over a Qil DataSource operator.
Don't construct QIL nodes directly; instead, use the QilFactory.
Inheritance: QilBinary
Esempio n. 1
0
        //-----------------------------------------------
        // specials
        //-----------------------------------------------
        public QilDataSource DataSource(QilNode name, QilNode baseUri)
        {
            QilDataSource n = new QilDataSource(QilNodeType.DataSource, name, baseUri);

            n.XmlType = this.typeCheck.CheckDataSource(n);
            TraceNode(n);
            return(n);
        }
Esempio n. 2
0
 protected virtual QilNode VisitDataSource(QilDataSource n)
 {
     return(VisitChildren(n));
 }
Esempio n. 3
0
 //-----------------------------------------------
 // specials
 //-----------------------------------------------
 public XmlQueryType CheckDataSource(QilDataSource node)
 {
     CheckXmlType(node.Name, XmlQueryTypeFactory.StringX);
     CheckXmlType(node.BaseUri, XmlQueryTypeFactory.StringX);
     return(XmlQueryTypeFactory.NodeNotRtfQ);
 }
 //-----------------------------------------------
 // specials
 //-----------------------------------------------
 public XmlQueryType CheckDataSource(QilDataSource node) {
     CheckXmlType(node.Name, XmlQueryTypeFactory.StringX);
     CheckXmlType(node.BaseUri, XmlQueryTypeFactory.StringX);
     return XmlQueryTypeFactory.NodeNotRtfQ;
 }
Esempio n. 5
0
 protected virtual QilNode VisitDataSource(QilDataSource n) { return VisitChildren(n); }
Esempio n. 6
0
 protected override QilNode VisitDataSource(QilDataSource n) { return NoReplace(n); }
Esempio n. 7
0
 protected override QilNode VisitDataSource(QilDataSource n)
 {
     return(NoReplace(n));
 }
 protected override QilNode VisitDataSource(QilDataSource local0) {
     QilNode local1 = local0[0];
     QilNode local2 = local0[1];
     if (this[XmlILOptimization.FoldNone]) {
         if ( (object) ( (local1).XmlType ) == (object) XmlQueryTypeFactory.None ) {
             if (AllowReplace(XmlILOptimization.FoldNone, local0)) {
                 return Replace(XmlILOptimization.FoldNone, local0, VisitNop(f.Nop(local1)));
             }
         }
     }
     if (this[XmlILOptimization.FoldNone]) {
         if ( (object) ( (local2).XmlType ) == (object) XmlQueryTypeFactory.None ) {
             if (AllowReplace(XmlILOptimization.FoldNone, local0)) {
                 return Replace(XmlILOptimization.FoldNone, local0, VisitNop(f.Nop(local2)));
             }
         }
     }
     return NoReplace(local0);
 }
Esempio n. 9
0
 //-----------------------------------------------
 // specials
 //-----------------------------------------------
 public QilDataSource DataSource(QilNode name, QilNode baseUri) {
     QilDataSource n = new QilDataSource(QilNodeType.DataSource, name, baseUri);
     n.XmlType = this.typeCheck.CheckDataSource(n);
     TraceNode(n);
     return n;
 }
Esempio n. 10
0
        /// <summary>
        /// Generate code for QilNodeType.DataSource.
        /// </summary>
        /// <remarks>
        /// Generates code to retrieve a document using the XmlResolver.
        /// </remarks>
        protected override QilNode VisitDataSource(QilDataSource ndSrc)
        {
            LocalBuilder locNav;

            // XPathNavigator navDoc = runtime.ExternalContext.GetEntity(uri)
            _helper.LoadQueryContext();
            NestedVisitEnsureStack(ndSrc.Name);
            NestedVisitEnsureStack(ndSrc.BaseUri);
            _helper.Call(XmlILMethods.GetDataSource);

            locNav = _helper.DeclareLocal("$$$navDoc", typeof(XPathNavigator));
            _helper.Emit(OpCodes.Stloc, locNav);

            // if (navDoc == null) goto LabelNextCtxt;
            _helper.Emit(OpCodes.Ldloc, locNav);
            _helper.Emit(OpCodes.Brfalse, _iterCurr.GetLabelNext());

            _iterCurr.Storage = StorageDescriptor.Local(locNav, typeof(XPathNavigator), false);

            return ndSrc;
        }