Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / ChildrenQuery.cs / 2 / ChildrenQuery.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; using System.Xml.Xsl; using System.Collections; internal class ChildrenQuery : BaseAxisQuery { XPathNodeIterator iterator = XPathEmptyIterator.Instance; public ChildrenQuery(Query qyInput, string name, string prefix, XPathNodeType type) : base (qyInput, name, prefix, type) {} protected ChildrenQuery(ChildrenQuery other) : base(other) { this.iterator = Clone(other.iterator); } public override void Reset() { iterator = XPathEmptyIterator.Instance; base.Reset(); } public override XPathNavigator Advance() { while (!iterator.MoveNext()) { XPathNavigator input = qyInput.Advance(); if (input == null) { return null; } if (NameTest) { if (TypeTest == XPathNodeType.ProcessingInstruction) { iterator = new IteratorFilter(input.SelectChildren(TypeTest), Name); } else { iterator = input.SelectChildren(Name, Namespace); } } else { iterator = input.SelectChildren(TypeTest); } position = 0; } position ++; currentNode = iterator.Current; return currentNode; } // Advance public sealed override XPathNavigator MatchNode(XPathNavigator context) { if (context != null) { if (matches(context)) { XPathNavigator temp = context.Clone(); if (temp.NodeType != XPathNodeType.Attribute && temp.MoveToParent()) { return qyInput.MatchNode(temp); } return null; } } return null; } public override XPathNodeIterator Clone() { return new ChildrenQuery(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
- SQLUtility.cs
- StringStorage.cs
- XamlSerializerUtil.cs
- XPathBinder.cs
- ProfileService.cs
- webclient.cs
- WindowsPen.cs
- EntitySqlQueryCacheKey.cs
- PrimarySelectionGlyph.cs
- GridViewEditEventArgs.cs
- SystemColors.cs
- SizeFConverter.cs
- AppDomainManager.cs
- RoleService.cs
- StateItem.cs
- TextureBrush.cs
- InvokeBase.cs
- HtmlInputPassword.cs
- HostedTcpTransportManager.cs
- TextContainerHelper.cs
- JsonReaderDelegator.cs
- Size3D.cs
- DiscoveryServerProtocol.cs
- AssociationEndMember.cs
- RtfToXamlLexer.cs
- PrivacyNoticeBindingElement.cs
- CodeGenerator.cs
- EmptyEnumerator.cs
- StateChangeEvent.cs
- WebRequestModuleElement.cs
- OrderByQueryOptionExpression.cs
- TableLayout.cs
- TypePresenter.xaml.cs
- ScriptControlDescriptor.cs
- OperationBehaviorAttribute.cs
- SystemMulticastIPAddressInformation.cs
- DataGridCommandEventArgs.cs
- MouseActionValueSerializer.cs
- MarshalByRefObject.cs
- CacheSection.cs
- SecurityPermission.cs
- SecurityPolicySection.cs
- ScriptReferenceEventArgs.cs
- ConfigDefinitionUpdates.cs
- IndicShape.cs
- RequestCacheEntry.cs
- ByteAnimationBase.cs
- Encoding.cs
- SqlEnums.cs
- ModifierKeysConverter.cs
- RelatedPropertyManager.cs
- RTLAwareMessageBox.cs
- ProcessHostServerConfig.cs
- ResourceReferenceKeyNotFoundException.cs
- baseaxisquery.cs
- CqlParserHelpers.cs
- DesignerCalendarAdapter.cs
- ExpandedWrapper.cs
- InputBindingCollection.cs
- ReplacementText.cs
- Propagator.JoinPropagator.cs
- LineGeometry.cs
- EntityClientCacheKey.cs
- XmlElementAttribute.cs
- AttachedAnnotation.cs
- HttpContextServiceHost.cs
- NamespaceList.cs
- TimeoutValidationAttribute.cs
- MessageQueueTransaction.cs
- SiteMapDataSource.cs
- AxImporter.cs
- RemotingConfigParser.cs
- Enum.cs
- PointF.cs
- ComboBoxAutomationPeer.cs
- Window.cs
- BitmapPalette.cs
- TypedDataSourceCodeGenerator.cs
- RecognizerBase.cs
- BoundingRectTracker.cs
- Delegate.cs
- VarRemapper.cs
- HitTestResult.cs
- EventSinkHelperWriter.cs
- VisualTreeHelper.cs
- CustomErrorsSection.cs
- TextRunTypographyProperties.cs
- XmlNodeChangedEventManager.cs
- GifBitmapDecoder.cs
- MissingFieldException.cs
- EncryptionUtility.cs
- StringArrayConverter.cs
- DataGridState.cs
- Button.cs
- InvokeGenerator.cs
- ModelPropertyCollectionImpl.cs
- StrongNameIdentityPermission.cs
- WorkflowOperationInvoker.cs
- UpdateManifestForBrowserApplication.cs
- COAUTHIDENTITY.cs