Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Core / ValidatingReaderNodeData.cs / 1305376 / 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
- ADRoleFactory.cs
- Directory.cs
- MiniCustomAttributeInfo.cs
- SecurityTokenException.cs
- NavigationWindowAutomationPeer.cs
- ValueConversionAttribute.cs
- HtmlInputControl.cs
- RecognizedWordUnit.cs
- ImmutableObjectAttribute.cs
- FragmentQuery.cs
- Attachment.cs
- SRGSCompiler.cs
- PackUriHelper.cs
- AssociatedControlConverter.cs
- HostingEnvironmentSection.cs
- IriParsingElement.cs
- StylusEventArgs.cs
- AppDomainEvidenceFactory.cs
- ButtonBase.cs
- SplitterCancelEvent.cs
- PagerSettings.cs
- PropertyOverridesDialog.cs
- DataPagerCommandEventArgs.cs
- HttpPostServerProtocol.cs
- InfiniteTimeSpanConverter.cs
- XmlQueryOutput.cs
- DiscoveryClientDuplexChannel.cs
- Options.cs
- ExceptionTrace.cs
- WindowsSolidBrush.cs
- Rotation3DAnimationBase.cs
- SelectionItemPattern.cs
- GridViewAutomationPeer.cs
- WebUtil.cs
- Rect3D.cs
- RegexTree.cs
- ResourceWriter.cs
- HttpNamespaceReservationInstallComponent.cs
- HTMLTextWriter.cs
- GregorianCalendarHelper.cs
- StoryFragments.cs
- PartManifestEntry.cs
- DbTransaction.cs
- ExpressionPrinter.cs
- ManagementOptions.cs
- Attribute.cs
- XsltConvert.cs
- OpenTypeLayoutCache.cs
- DataGridViewCheckBoxColumn.cs
- PropertySourceInfo.cs
- _NestedSingleAsyncResult.cs
- ISessionStateStore.cs
- ImageFormatConverter.cs
- HttpWebRequest.cs
- ELinqQueryState.cs
- StackBuilderSink.cs
- CacheOutputQuery.cs
- XmlRawWriter.cs
- TdsParameterSetter.cs
- ScrollEvent.cs
- AspCompat.cs
- ReferencedCollectionType.cs
- DataServiceEntityAttribute.cs
- _NegoStream.cs
- SessionIDManager.cs
- TrackingProfileSerializer.cs
- XmlSchemaComplexContent.cs
- UIAgentCrashedException.cs
- PtsHelper.cs
- sqlcontext.cs
- XamlSerializerUtil.cs
- HotSpotCollection.cs
- CodeSnippetStatement.cs
- BufferBuilder.cs
- oledbconnectionstring.cs
- VisualStyleElement.cs
- CodeMemberEvent.cs
- SafeFileMappingHandle.cs
- SchemaCollectionCompiler.cs
- ObjectHandle.cs
- OdbcConnectionFactory.cs
- InvokeMethodActivityDesigner.cs
- ConfigurationProperty.cs
- DnsPermission.cs
- ScopelessEnumAttribute.cs
- ValidationErrorCollection.cs
- WebRequestModuleElementCollection.cs
- Int16AnimationUsingKeyFrames.cs
- BigInt.cs
- SearchForVirtualItemEventArgs.cs
- Trace.cs
- TemplateBindingExtension.cs
- SymmetricAlgorithm.cs
- InvalidComObjectException.cs
- CollectionChangeEventArgs.cs
- DescendentsWalker.cs
- TableColumnCollectionInternal.cs
- ComboBox.cs
- ConstrainedDataObject.cs
- BinaryOperationBinder.cs