Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / AttributeQuery.cs / 1 / AttributeQuery.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; using System.Globalization; internal sealed class AttributeQuery : BaseAxisQuery { private bool onAttribute = false; public AttributeQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type) : base(qyParent, Name, Prefix, Type) {} private AttributeQuery(AttributeQuery other) : base(other) { this.onAttribute = other.onAttribute; } public override void Reset() { onAttribute = false; base.Reset(); } public override XPathNavigator Advance() { while (true) { if (! onAttribute) { currentNode = qyInput.Advance(); if (currentNode == null) { return null; } position = 0; currentNode = currentNode.Clone(); onAttribute = currentNode.MoveToFirstAttribute(); } else { onAttribute = currentNode.MoveToNextAttribute(); } if (onAttribute) { Debug.Assert(! currentNode.NamespaceURI.Equals(XmlReservedNs.NsXmlNs)); if (matches(currentNode)) { position++; return currentNode; } } } // while } public override XPathNavigator MatchNode(XPathNavigator context) { if (context != null) { if (context.NodeType == XPathNodeType.Attribute && matches(context)) { XPathNavigator temp = context.Clone(); if (temp.MoveToParent()) { return qyInput.MatchNode(temp); } } } return null; } public override XPathNodeIterator Clone() { return new AttributeQuery(this); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PeerNameResolver.cs
- HandlerFactoryCache.cs
- ExceptionRoutedEventArgs.cs
- DataServiceStreamProviderWrapper.cs
- _NetRes.cs
- wgx_exports.cs
- ProgressChangedEventArgs.cs
- WebPartDescription.cs
- PeerInvitationResponse.cs
- PropertyGridCommands.cs
- PointUtil.cs
- Monitor.cs
- NetSectionGroup.cs
- FontDialog.cs
- MatrixTransform.cs
- SoapObjectWriter.cs
- smtpconnection.cs
- GeneralTransformGroup.cs
- SendDesigner.xaml.cs
- SplineQuaternionKeyFrame.cs
- BindingListCollectionView.cs
- RelationshipType.cs
- OverflowException.cs
- QilScopedVisitor.cs
- ParseHttpDate.cs
- SizeValueSerializer.cs
- TerminateSequenceResponse.cs
- TypeName.cs
- AmbiguousMatchException.cs
- SmiEventSink_DeferedProcessing.cs
- userdatakeys.cs
- ValuePattern.cs
- GrowingArray.cs
- OutputCacheProfileCollection.cs
- StickyNoteAnnotations.cs
- WebResourceAttribute.cs
- BinaryParser.cs
- X509ThumbprintKeyIdentifierClause.cs
- CodeDOMProvider.cs
- CheckBoxField.cs
- Attributes.cs
- SmuggledIUnknown.cs
- SourceChangedEventArgs.cs
- GridView.cs
- DBSchemaTable.cs
- ArgumentDesigner.xaml.cs
- shaperfactory.cs
- TextBreakpoint.cs
- FileSecurity.cs
- ChannelManager.cs
- ComboBox.cs
- PeerServiceMessageContracts.cs
- BamlRecords.cs
- ConnectionPoint.cs
- PolicyVersion.cs
- DragStartedEventArgs.cs
- StreamSecurityUpgradeAcceptorBase.cs
- Rules.cs
- EventLogRecord.cs
- Type.cs
- Transform3DGroup.cs
- TcpDuplicateContext.cs
- CompiledQuery.cs
- ResourcePart.cs
- ChildDocumentBlock.cs
- EnvelopedPkcs7.cs
- WriteableOnDemandPackagePart.cs
- XmlSchemaExternal.cs
- MessageFormatterConverter.cs
- InertiaRotationBehavior.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- EncoderNLS.cs
- MsmqIntegrationProcessProtocolHandler.cs
- RawStylusActions.cs
- AccessDataSourceDesigner.cs
- SlotInfo.cs
- COM2IDispatchConverter.cs
- RenderData.cs
- WindowsTitleBar.cs
- XmlBinaryReader.cs
- DocumentEventArgs.cs
- ColorAnimationBase.cs
- Propagator.Evaluator.cs
- BitmapVisualManager.cs
- DependencyPropertyAttribute.cs
- WorkflowItemPresenter.cs
- panel.cs
- WindowsFont.cs
- XmlSchemaComplexContentRestriction.cs
- RegionInfo.cs
- querybuilder.cs
- EntitySetRetriever.cs
- BypassElement.cs
- Queue.cs
- HashJoinQueryOperatorEnumerator.cs
- WorkflowPrinting.cs
- EncodingNLS.cs
- fixedPageContentExtractor.cs
- SessionStateUtil.cs
- NameNode.cs