Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / Xml / System / Xml / Core / ValidatingReaderNodeData.cs / 5 / 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
- PathGeometry.cs
- ContractType.cs
- PropertyValueUIItem.cs
- DesignerSerializationVisibilityAttribute.cs
- SoapCodeExporter.cs
- DataGridViewCellStyleConverter.cs
- UIntPtr.cs
- ModifierKeysValueSerializer.cs
- SubqueryRules.cs
- QuotedPrintableStream.cs
- StyleSheetRefUrlEditor.cs
- InputElement.cs
- WrappedReader.cs
- WriterOutput.cs
- ReadOnlyObservableCollection.cs
- TTSEvent.cs
- SharedPerformanceCounter.cs
- BitmapEffect.cs
- TitleStyle.cs
- KnownBoxes.cs
- ExecutionPropertyManager.cs
- TimelineGroup.cs
- CodeSnippetStatement.cs
- BinaryMethodMessage.cs
- CodeDirectiveCollection.cs
- DataRecordInternal.cs
- NativeActivity.cs
- OdbcConnectionOpen.cs
- SizeIndependentAnimationStorage.cs
- ZipIOExtraField.cs
- XPathBinder.cs
- RangeValueProviderWrapper.cs
- HtmlDocument.cs
- GridViewEditEventArgs.cs
- UpdateException.cs
- GlyphRun.cs
- OpenTypeCommon.cs
- ContentControl.cs
- GB18030Encoding.cs
- Color.cs
- MsmqTransportSecurityElement.cs
- X509AsymmetricSecurityKey.cs
- PropertyMetadata.cs
- CircleHotSpot.cs
- TemplateLookupAction.cs
- OutArgument.cs
- TextTreeFixupNode.cs
- CheckBoxStandardAdapter.cs
- XmlAutoDetectWriter.cs
- DataGridViewCellStyleConverter.cs
- DtdParser.cs
- TrackBarRenderer.cs
- ProfileEventArgs.cs
- querybuilder.cs
- DPAPIProtectedConfigurationProvider.cs
- Convert.cs
- ToolBar.cs
- TypeConverterAttribute.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- BamlVersionHeader.cs
- RelationshipEntry.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- HitTestParameters.cs
- EnumValAlphaComparer.cs
- ITextView.cs
- RemotingException.cs
- WindowHideOrCloseTracker.cs
- ListControlStringCollectionEditor.cs
- ResourceProperty.cs
- HttpConfigurationContext.cs
- StructuredTypeInfo.cs
- SplineQuaternionKeyFrame.cs
- SvcMapFileSerializer.cs
- FixedTextView.cs
- SelectionProviderWrapper.cs
- InstanceLockException.cs
- GridViewColumn.cs
- WeakReference.cs
- GeneratedView.cs
- ProtocolsConfiguration.cs
- Buffer.cs
- odbcmetadatafactory.cs
- VerticalAlignConverter.cs
- JsonFormatMapping.cs
- ServiceChannelManager.cs
- KnownColorTable.cs
- Exceptions.cs
- RawTextInputReport.cs
- InkCanvasFeedbackAdorner.cs
- PartBasedPackageProperties.cs
- GridViewColumnHeader.cs
- ScriptBehaviorDescriptor.cs
- ImageListImage.cs
- SoapException.cs
- TemplatePropertyEntry.cs
- Evidence.cs
- Stroke.cs
- DesignerAdRotatorAdapter.cs
- SchemaEntity.cs
- ModelPropertyDescriptor.cs