public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) { Debug.Assert(schemaCollection == null || schemaCollection.NameTable == reader.NameTable); this.reader = reader; this.schemaCollection = schemaCollection; this.eventHandling = eventHandling; nameTable = reader.NameTable; positionInfo = PositionInfo.GetPositionInfo(reader); elementName = new XmlQualifiedName(); }
public BaseValidator(XmlValidatingReaderImpl reader, XmlSchemaCollection schemaCollection, IValidationEventHandling eventHandling) { this.reader = reader; this.schemaCollection = schemaCollection; this.eventHandling = eventHandling; this.nameTable = reader.NameTable; this.positionInfo = System.Xml.PositionInfo.GetPositionInfo(reader); this.elementName = new XmlQualifiedName(); }
public BaseValidator(BaseValidator other) { reader = other.reader; schemaCollection = other.schemaCollection; eventHandling = other.eventHandling; nameTable = other.nameTable; schemaNames = other.schemaNames; positionInfo = other.positionInfo; xmlResolver = other.xmlResolver; baseUri = other.baseUri; elementName = other.elementName; }
public BaseValidator(BaseValidator other) { this.reader = other.reader; this.schemaCollection = other.schemaCollection; this.eventHandling = other.eventHandling; this.nameTable = other.nameTable; this.schemaNames = other.schemaNames; this.positionInfo = other.positionInfo; this.xmlResolver = other.xmlResolver; this.baseUri = other.baseUri; this.elementName = other.elementName; }
public BaseValidator(BaseValidator other) { reader = other.reader; _schemaCollection = other._schemaCollection; _eventHandling = other._eventHandling; _nameTable = other._nameTable; _schemaNames = other._schemaNames; _positionInfo = other._positionInfo; _xmlResolver = other._xmlResolver; _baseUri = other._baseUri; elementName = other.elementName; }
internal void Close() { _Navigator = null; _PositionInfo = null; }
// // Constructor // internal NavigatorInput(XPathNavigator navigator, string baseUri, InputScope rootScope) { if (navigator == null) { throw new ArgumentNullException(nameof(navigator)); } if (baseUri == null) { throw new ArgumentNullException(nameof(baseUri)); } Debug.Assert(navigator.NameTable != null); _Next = null; _Href = baseUri; _Atoms = new KeywordsTable(navigator.NameTable); _Navigator = navigator; _Manager = new InputScopeManager(_Navigator, rootScope); _PositionInfo = PositionInfo.GetPositionInfo(_Navigator); /*BeginReading:*/ AssertInput(); if (NodeType == XPathNodeType.Root) { _Navigator.MoveToFirstChild(); } }
internal XdrBuilder(XmlReader reader, XmlNamespaceManager curmgr, SchemaInfo sinfo, string targetNamspace, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler) { this._SchemaInfo = sinfo; this._TargetNamespace = targetNamspace; this._reader = reader; this._CurNsMgr = curmgr; this.validationEventHandler = eventhandler; this._StateHistory = new HWStack(10); this._ElementDef = new ElementContent(); this._AttributeDef = new AttributeContent(); this._GroupStack = new HWStack(10); this._GroupDef = new GroupContent(); this._NameTable = nameTable; this._SchemaNames = schemaNames; this._CurState = S_SchemaEntries[0]; this.positionInfo = PositionInfo.GetPositionInfo(this._reader); this.xmlResolver = new XmlUrlResolver(); }
public void StartParsing(XmlReader reader, string targetNamespace) { string str; this.reader = reader; this.positionInfo = PositionInfo.GetPositionInfo(reader); this.namespaceManager = reader.NamespaceManager; if (this.namespaceManager == null) { this.namespaceManager = new XmlNamespaceManager(this.nameTable); this.isProcessNamespaces = true; } else { this.isProcessNamespaces = false; } while ((reader.NodeType != XmlNodeType.Element) && reader.Read()) { } this.markupDepth = 0x7fffffff; this.schemaXmlDepth = reader.Depth; SchemaType rootType = this.schemaNames.SchemaTypeFromRoot(reader.LocalName, reader.NamespaceURI); if (!this.CheckSchemaRoot(rootType, out str)) { throw new XmlSchemaException(str, reader.BaseURI, this.positionInfo.LineNumber, this.positionInfo.LinePosition); } if (this.schemaType == SchemaType.XSD) { this.schema = new System.Xml.Schema.XmlSchema(); this.schema.BaseUri = new Uri(reader.BaseURI, UriKind.RelativeOrAbsolute); this.builder = new XsdBuilder(reader, this.namespaceManager, this.schema, this.nameTable, this.schemaNames, this.eventHandler); } else { this.xdrSchema = new SchemaInfo(); this.xdrSchema.SchemaType = SchemaType.XDR; this.builder = new XdrBuilder(reader, this.namespaceManager, this.xdrSchema, targetNamespace, this.nameTable, this.schemaNames, this.eventHandler); ((XdrBuilder) this.builder).XmlResolver = this.xmlResolver; } }
PositionInfo GetPositionInfo(PositionDataXml position) { PositionInfo info = new PositionInfo(); //info.PosID = position.PosID; typeof(PositionInfo).GetProperty("PosID").SetValue(info, position.PosID, null); //info.Symbol = position.Symbol; typeof(PositionInfo).GetProperty("Symbol").SetValue(info, position.Symbol, null); info.PositionType = position.PositionType; //info.Description = position.Description; typeof(PositionInfo).GetProperty("Description").SetValue(info, position.Description, null); foreach (TradeInfo tradeInfo in position.Trades) { info.Trades.Add(tradeInfo); } return info; }
internal XsdBuilder( XmlReader reader, XmlNamespaceManager curmgr, XmlSchema schema, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler ) { this.reader = reader; this.xso = this.schema = schema; this.namespaceManager = curmgr; this.validationEventHandler = eventhandler; this.nameTable = nameTable; this.schemaNames = schemaNames; this.stateHistory = new HWStack(STACK_INCREMENT); this.currentEntry = SchemaEntries[0]; positionInfo = PositionInfo.GetPositionInfo(reader); }
internal XsdBuilder( XmlReader reader, XmlNamespaceManager curmgr, XmlSchema schema, XmlNameTable nameTable, SchemaNames schemaNames, ValidationEventHandler eventhandler ) { _reader = reader; _xso = _schema = schema; _namespaceManager = new BuilderNamespaceManager(curmgr, reader); _validationEventHandler = eventhandler; _nameTable = nameTable; _schemaNames = schemaNames; _stateHistory = new HWStack(STACK_INCREMENT); _currentEntry = s_schemaEntries[0]; _positionInfo = PositionInfo.GetPositionInfo(reader); }