Example #1
0
 public XmlWriterContext(string ns, string prefix, bool qualifiedElement, bool qualifiedAttribute)
 {
     this._ns     = ns;
     this._pref   = prefix;
     this._qattr  = qualifiedAttribute;
     this._qele   = qualifiedElement;
     this._params = new DBParamList();
 }
Example #2
0
 public XmlReaderContext(string ns, string pref, XmlFactory factory, bool qualifiedElement, bool qualifiedAttribute)
 {
     this._fact   = factory;
     this._ns     = ns;
     this._pref   = pref;
     this._qattr  = qualifiedAttribute;
     this._qele   = qualifiedElement;
     this._params = new DBParamList();
 }
 protected override bool ReadAnInnerElement(System.Xml.XmlReader reader, XmlReaderContext context)
 {
     if (this.IsElementMatch(XmlHelper.SprocParams, reader, context))
     {
         DBParamList paramlist = new DBParamList();
         while (reader.Read())
         {
             if (IsElementMatch(XmlHelper.Parameter, reader, context))
             {
                 DBParam p = DBParam.Param();
                 p.ReadXml(reader, context);
                 if (context.Parameters.Contains(p.Name))
                 {
                     p = context.Parameters[p.Name];
                 }
                 else
                 {
                     context.Parameters.Add(p);
                 }
                 paramlist.Add(p);
             }
             else if (reader.NodeType == System.Xml.XmlNodeType.EndElement && reader.LocalName == XmlHelper.SprocParams)
             {
                 break;
             }
         }
         this.Parameters = paramlist;
         return(true);
     }
     else if (IsElementMatch(XmlHelper.Script, reader, context))
     {
         DBClause c = this.ReadNextInnerClause(reader.LocalName, reader, context);
         if (c is DBScript)
         {
             this.Script = (DBScript)c;
         }
         else
         {
             throw new System.Xml.XmlException("Inner content of a StoredProcedure must be a Script");
         }
         return(true);
     }
     return(base.ReadAnInnerElement(reader, context));
 }