Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / DescendantBaseQuery.cs / 1 / DescendantBaseQuery.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; internal abstract class DescendantBaseQuery : BaseAxisQuery { protected bool matchSelf; protected bool abbrAxis; public DescendantBaseQuery(Query qyParent, string Name, string Prefix, XPathNodeType Type, bool matchSelf, bool abbrAxis) : base(qyParent, Name, Prefix, Type) { this.matchSelf = matchSelf; this.abbrAxis = abbrAxis; } public DescendantBaseQuery(DescendantBaseQuery other) : base(other) { this.matchSelf = other.matchSelf; this.abbrAxis = other.abbrAxis; } public override XPathNavigator MatchNode(XPathNavigator context) { if (context != null) { if (!abbrAxis) { throw XPathException.Create(Res.Xp_InvalidPattern); } XPathNavigator result = null; if (matches(context)) { if (matchSelf) { if ((result = qyInput.MatchNode(context)) != null) { return result; } } XPathNavigator anc = context.Clone(); while (anc.MoveToParent()) { if ((result = qyInput.MatchNode(anc)) != null) { return result; } } } } return null; } public override void PrintQuery(XmlWriter w) { w.WriteStartElement(this.GetType().Name); if (matchSelf) { w.WriteAttributeString("self", "yes"); } if (NameTest) { w.WriteAttributeString("name", Prefix.Length != 0 ? Prefix + ':' + Name : Name); } if (TypeTest != XPathNodeType.Element) { w.WriteAttributeString("nodeType", TypeTest.ToString()); } qyInput.PrintQuery(w); w.WriteEndElement(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CookielessHelper.cs
- InputProcessorProfiles.cs
- TraceSource.cs
- ExtentKey.cs
- StdValidatorsAndConverters.cs
- NotFiniteNumberException.cs
- AnchorEditor.cs
- SchemaSetCompiler.cs
- LinqDataSource.cs
- TabItem.cs
- ExclusiveHandle.cs
- Ray3DHitTestResult.cs
- RSAPKCS1SignatureDeformatter.cs
- GroupDescription.cs
- _SSPISessionCache.cs
- BroadcastEventHelper.cs
- DataService.cs
- ButtonStandardAdapter.cs
- PipeSecurity.cs
- ExtensionQuery.cs
- HttpCacheVary.cs
- DataColumnCollection.cs
- PointLightBase.cs
- DeferredSelectedIndexReference.cs
- BinaryFormatterWriter.cs
- TypeExtensions.cs
- WindowsListViewGroup.cs
- DataTableMapping.cs
- IApplicationTrustManager.cs
- GridViewUpdatedEventArgs.cs
- GPStream.cs
- Polygon.cs
- TextBreakpoint.cs
- FormView.cs
- SafeHandles.cs
- IndependentlyAnimatedPropertyMetadata.cs
- precedingquery.cs
- DbConnectionHelper.cs
- ExpressionCopier.cs
- CompensationToken.cs
- TrackingParameters.cs
- XmlIterators.cs
- CodeExpressionStatement.cs
- RoleManagerSection.cs
- Stylesheet.cs
- UriSectionData.cs
- ContextStaticAttribute.cs
- TableLayoutRowStyleCollection.cs
- OneOfScalarConst.cs
- DropSource.cs
- XmlSchemaAnnotated.cs
- OpacityConverter.cs
- StylusEventArgs.cs
- StylusOverProperty.cs
- DependencyObjectType.cs
- DataGridViewButtonCell.cs
- TreeViewImageKeyConverter.cs
- InputProcessorProfiles.cs
- BulletedListEventArgs.cs
- PathSegment.cs
- SQLBinary.cs
- SafeNativeMethodsCLR.cs
- MenuCommandService.cs
- ArraySegment.cs
- ComboBoxRenderer.cs
- JoinElimination.cs
- CanonicalFormWriter.cs
- QilUnary.cs
- ProtocolReflector.cs
- TextSchema.cs
- PersianCalendar.cs
- LateBoundBitmapDecoder.cs
- AdjustableArrowCap.cs
- XmlDataSourceView.cs
- InputLanguageEventArgs.cs
- InfoCardService.cs
- InputBinder.cs
- RestHandlerFactory.cs
- OperandQuery.cs
- KeyboardEventArgs.cs
- AssertFilter.cs
- Int64AnimationBase.cs
- TypedElement.cs
- GridView.cs
- DatagridviewDisplayedBandsData.cs
- RangeValueProviderWrapper.cs
- Version.cs
- ErrorRuntimeConfig.cs
- RemotingException.cs
- GestureRecognizer.cs
- EditBehavior.cs
- TransferRequestHandler.cs
- TextEndOfLine.cs
- MessageAction.cs
- DataGridRow.cs
- Variant.cs
- RequestNavigateEventArgs.cs
- ActionFrame.cs
- MostlySingletonList.cs
- hresults.cs