Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Xml / System / Xml / Core / ValidatingReaderNodeData.cs / 1 / ValidatingReaderNodeData.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.IO; using System.Text; using System.Collections; using System.Xml.Schema; using System.Diagnostics; using System.Globalization; namespace System.Xml { internal class ValidatingReaderNodeData { string localName; string namespaceUri; string prefix; string nameWPrefix; string rawValue; string originalStringValue; // Original value int depth; AttributePSVIInfo attributePSVIInfo; //Used only for default attributes XmlNodeType nodeType; int lineNo; int linePos; public ValidatingReaderNodeData() { Clear(XmlNodeType.None); } public ValidatingReaderNodeData(XmlNodeType nodeType) { Clear(nodeType); } public string LocalName { get { return localName; } set { localName = value; } } public string Namespace { get { return namespaceUri; } set { namespaceUri = value; } } public string Prefix { get { return prefix; } set { prefix = value; } } public string GetAtomizedNameWPrefix(XmlNameTable nameTable) { if (nameWPrefix == null) { if (prefix.Length == 0 ) { nameWPrefix = localName; } else { nameWPrefix = nameTable.Add ( string.Concat (prefix,":", localName)); } } return nameWPrefix; } public int Depth { get { return depth; } set { depth = value; } } public string RawValue { get { return rawValue; } set { rawValue = value; } } public string OriginalStringValue { get { return originalStringValue; } set { originalStringValue = value; } } public XmlNodeType NodeType { get { return nodeType; } set { nodeType = value; } } public AttributePSVIInfo AttInfo { get { return attributePSVIInfo; } set { attributePSVIInfo = value; } } public int LineNumber { get { return lineNo; } } public int LinePosition { get { return linePos; } } internal void Clear( XmlNodeType nodeType ) { this.nodeType = nodeType; localName = string.Empty; prefix = string.Empty; namespaceUri = string.Empty; rawValue = string.Empty; if (attributePSVIInfo != null) { attributePSVIInfo.Reset(); } nameWPrefix = null; lineNo = 0; linePos = 0; } internal void ClearName() { localName = string.Empty; prefix = string.Empty; namespaceUri = string.Empty; } internal void SetLineInfo( int lineNo, int linePos ) { this.lineNo = lineNo; this.linePos = linePos; } internal void SetLineInfo( IXmlLineInfo lineInfo ) { if (lineInfo != null) { this.lineNo = lineInfo.LineNumber; this.linePos = lineInfo.LinePosition; } } internal void SetItemData(string localName, string prefix, string ns, string value) { this.localName = localName; this.prefix = prefix; namespaceUri = ns; rawValue = value; } internal void SetItemData(string localName, string prefix, string ns, int depth) { this.localName = localName; this.prefix = prefix; namespaceUri = ns; this.depth = depth; rawValue = string.Empty; } internal void SetItemData(string value) { SetItemData(value, value); } internal void SetItemData(string value, string originalStringValue) { rawValue = value; this.originalStringValue = originalStringValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.IO; using System.Text; using System.Collections; using System.Xml.Schema; using System.Diagnostics; using System.Globalization; namespace System.Xml { internal class ValidatingReaderNodeData { string localName; string namespaceUri; string prefix; string nameWPrefix; string rawValue; string originalStringValue; // Original value int depth; AttributePSVIInfo attributePSVIInfo; //Used only for default attributes XmlNodeType nodeType; int lineNo; int linePos; public ValidatingReaderNodeData() { Clear(XmlNodeType.None); } public ValidatingReaderNodeData(XmlNodeType nodeType) { Clear(nodeType); } public string LocalName { get { return localName; } set { localName = value; } } public string Namespace { get { return namespaceUri; } set { namespaceUri = value; } } public string Prefix { get { return prefix; } set { prefix = value; } } public string GetAtomizedNameWPrefix(XmlNameTable nameTable) { if (nameWPrefix == null) { if (prefix.Length == 0 ) { nameWPrefix = localName; } else { nameWPrefix = nameTable.Add ( string.Concat (prefix,":", localName)); } } return nameWPrefix; } public int Depth { get { return depth; } set { depth = value; } } public string RawValue { get { return rawValue; } set { rawValue = value; } } public string OriginalStringValue { get { return originalStringValue; } set { originalStringValue = value; } } public XmlNodeType NodeType { get { return nodeType; } set { nodeType = value; } } public AttributePSVIInfo AttInfo { get { return attributePSVIInfo; } set { attributePSVIInfo = value; } } public int LineNumber { get { return lineNo; } } public int LinePosition { get { return linePos; } } internal void Clear( XmlNodeType nodeType ) { this.nodeType = nodeType; localName = string.Empty; prefix = string.Empty; namespaceUri = string.Empty; rawValue = string.Empty; if (attributePSVIInfo != null) { attributePSVIInfo.Reset(); } nameWPrefix = null; lineNo = 0; linePos = 0; } internal void ClearName() { localName = string.Empty; prefix = string.Empty; namespaceUri = string.Empty; } internal void SetLineInfo( int lineNo, int linePos ) { this.lineNo = lineNo; this.linePos = linePos; } internal void SetLineInfo( IXmlLineInfo lineInfo ) { if (lineInfo != null) { this.lineNo = lineInfo.LineNumber; this.linePos = lineInfo.LinePosition; } } internal void SetItemData(string localName, string prefix, string ns, string value) { this.localName = localName; this.prefix = prefix; namespaceUri = ns; rawValue = value; } internal void SetItemData(string localName, string prefix, string ns, int depth) { this.localName = localName; this.prefix = prefix; namespaceUri = ns; this.depth = depth; rawValue = string.Empty; } internal void SetItemData(string value) { SetItemData(value, value); } internal void SetItemData(string value, string originalStringValue) { rawValue = value; this.originalStringValue = originalStringValue; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataSourceSerializationException.cs
- ListBoxItemWrapperAutomationPeer.cs
- SystemIPInterfaceProperties.cs
- UnsafeNativeMethods.cs
- SimpleHandlerBuildProvider.cs
- FileStream.cs
- StyleXamlTreeBuilder.cs
- XPathExpr.cs
- FileSystemEventArgs.cs
- DataFormats.cs
- Automation.cs
- TableParagraph.cs
- TimelineClockCollection.cs
- FormCollection.cs
- GZipStream.cs
- CommonProperties.cs
- UnsafeNativeMethodsTablet.cs
- ToolStripOverflow.cs
- ListControl.cs
- XmlCollation.cs
- CodeChecksumPragma.cs
- DoWorkEventArgs.cs
- Size.cs
- VectorAnimationBase.cs
- StandardCommands.cs
- ScrollBarAutomationPeer.cs
- ComponentResourceManager.cs
- XmlArrayItemAttribute.cs
- SystemNetHelpers.cs
- CookieProtection.cs
- ViewLoader.cs
- SqlTypeSystemProvider.cs
- ProgressPage.cs
- ExitEventArgs.cs
- WorkflowInlining.cs
- BaseCodeDomTreeGenerator.cs
- CompilerGlobalScopeAttribute.cs
- ProcessHostConfigUtils.cs
- ProviderMetadata.cs
- XsdDataContractImporter.cs
- DeferrableContent.cs
- BinHexEncoder.cs
- SafeCryptoHandles.cs
- FeatureSupport.cs
- WeakHashtable.cs
- InvokeMethodActivity.cs
- HttpTransportSecurity.cs
- LayoutEditorPart.cs
- AutomationPatternInfo.cs
- Vector3DKeyFrameCollection.cs
- PersistChildrenAttribute.cs
- CorrelationValidator.cs
- JoinGraph.cs
- KeySplineConverter.cs
- SQLDecimal.cs
- webeventbuffer.cs
- RemotingSurrogateSelector.cs
- BypassElement.cs
- ProjectionPruner.cs
- OleDbConnection.cs
- StringConverter.cs
- TranslateTransform.cs
- DiscreteKeyFrames.cs
- ThicknessConverter.cs
- Command.cs
- MetadataArtifactLoaderResource.cs
- SoapConverter.cs
- InputReport.cs
- IBuiltInEvidence.cs
- ExpressionVisitorHelpers.cs
- TdsRecordBufferSetter.cs
- OleDbMetaDataFactory.cs
- WebPartActionVerb.cs
- SmtpFailedRecipientException.cs
- PaintEvent.cs
- TypeSystem.cs
- TraceInternal.cs
- SQLMoney.cs
- SendMessageRecord.cs
- Control.cs
- RightsManagementPermission.cs
- DataSourceHelper.cs
- DataGridRow.cs
- ToolStripStatusLabel.cs
- ButtonStandardAdapter.cs
- WindowsComboBox.cs
- CommandManager.cs
- MenuTracker.cs
- WmlFormAdapter.cs
- CodeMemberField.cs
- ResXDataNode.cs
- FileStream.cs
- TransactionInterop.cs
- Version.cs
- translator.cs
- HttpsTransportBindingElement.cs
- JoinTreeSlot.cs
- InputQueueChannel.cs
- DbMetaDataFactory.cs
- DesignTimeTemplateParser.cs