Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / DescendantBaseQuery.cs / 1305376 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TrustLevelCollection.cs
- WebPartEditorCancelVerb.cs
- URLMembershipCondition.cs
- ActivityWithResultValueSerializer.cs
- SingleConverter.cs
- HashSetEqualityComparer.cs
- UriSection.cs
- InstanceStore.cs
- CopyOfAction.cs
- DataColumnMapping.cs
- WebEventCodes.cs
- FlowDocumentPage.cs
- EventManager.cs
- Timer.cs
- Rfc2898DeriveBytes.cs
- CodeObject.cs
- SelectManyQueryOperator.cs
- SchemaTableColumn.cs
- EmptyCollection.cs
- SplitterPanel.cs
- SafeViewOfFileHandle.cs
- XpsInterleavingPolicy.cs
- LineGeometry.cs
- DataSourceDesigner.cs
- ThemeDirectoryCompiler.cs
- AssociationTypeEmitter.cs
- TimeSpanOrInfiniteValidator.cs
- ControlAdapter.cs
- CounterCreationDataCollection.cs
- ScriptManagerProxy.cs
- HttpRequestWrapper.cs
- SecurityCriticalDataForSet.cs
- ButtonBase.cs
- Menu.cs
- ObjectListFieldsPage.cs
- SqlFunctionAttribute.cs
- IndependentlyAnimatedPropertyMetadata.cs
- SplineQuaternionKeyFrame.cs
- RequestReplyCorrelator.cs
- TraceHwndHost.cs
- AliasedSlot.cs
- TableRowGroupCollection.cs
- GridViewRowPresenterBase.cs
- DelegateTypeInfo.cs
- CustomLineCap.cs
- XsdValidatingReader.cs
- TypeHelpers.cs
- Point4DConverter.cs
- SemanticBasicElement.cs
- StatusBarDrawItemEvent.cs
- SQLRoleProvider.cs
- DataGridViewCellPaintingEventArgs.cs
- TextTreeRootTextBlock.cs
- EventProviderTraceListener.cs
- CellTreeSimplifier.cs
- QilChoice.cs
- HostingEnvironmentWrapper.cs
- Cursor.cs
- SizeAnimationUsingKeyFrames.cs
- AddInController.cs
- BuildProvider.cs
- DateTimeConverter2.cs
- DefaultValueAttribute.cs
- ModelServiceImpl.cs
- Assembly.cs
- ExtensibleClassFactory.cs
- ThemeDirectoryCompiler.cs
- ResourceReader.cs
- ListComponentEditor.cs
- CopyAttributesAction.cs
- FreezableOperations.cs
- CroppedBitmap.cs
- ICspAsymmetricAlgorithm.cs
- Message.cs
- DataGridViewSelectedColumnCollection.cs
- ComponentDispatcher.cs
- ItemChangedEventArgs.cs
- RowParagraph.cs
- InputLanguageSource.cs
- _CookieModule.cs
- Span.cs
- ExpressionBuilder.cs
- Site.cs
- ObjectAnimationBase.cs
- OleDbCommandBuilder.cs
- WSDualHttpBindingElement.cs
- CqlBlock.cs
- CodeDomLocalizationProvider.cs
- SimpleWebHandlerParser.cs
- SmtpSection.cs
- controlskin.cs
- CreateParams.cs
- CodeTypeReferenceExpression.cs
- CodeSnippetExpression.cs
- PropertyMappingExceptionEventArgs.cs
- DrawingVisualDrawingContext.cs
- HandleTable.cs
- ChildTable.cs
- SmtpDigestAuthenticationModule.cs
- DataServiceHostFactory.cs