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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SmtpAuthenticationManager.cs
- EntityPropertyMappingAttribute.cs
- TreeView.cs
- DoubleStorage.cs
- SpellerInterop.cs
- SqlDependencyUtils.cs
- Aggregates.cs
- FormViewCommandEventArgs.cs
- PropertyGridView.cs
- SurrogateEncoder.cs
- ImageListStreamer.cs
- PartEditor.cs
- SamlDelegatingWriter.cs
- Utilities.cs
- MessageQueue.cs
- TCPClient.cs
- OpenFileDialog.cs
- XpsFixedDocumentSequenceReaderWriter.cs
- SecureEnvironment.cs
- GetPageCompletedEventArgs.cs
- KeyTimeConverter.cs
- OneOfElement.cs
- InternalBufferManager.cs
- ObjectHelper.cs
- PropertyRef.cs
- ManagedFilter.cs
- CheckBoxRenderer.cs
- MailAddress.cs
- TriggerAction.cs
- TextServicesHost.cs
- EncoderExceptionFallback.cs
- CalendarItem.cs
- TriggerCollection.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- ValidatorCompatibilityHelper.cs
- DiscreteKeyFrames.cs
- SqlCachedBuffer.cs
- DBSchemaRow.cs
- ImpersonationContext.cs
- FactoryId.cs
- PopOutPanel.cs
- itemelement.cs
- BindMarkupExtensionSerializer.cs
- HttpResponseHeader.cs
- DescendentsWalkerBase.cs
- FormViewDeletedEventArgs.cs
- HtmlUtf8RawTextWriter.cs
- PagePropertiesChangingEventArgs.cs
- AncillaryOps.cs
- SchemaAttDef.cs
- TextBoxAutomationPeer.cs
- InnerItemCollectionView.cs
- ProviderUtil.cs
- XmlNamespaceMapping.cs
- CharStorage.cs
- RectValueSerializer.cs
- EdmItemError.cs
- EntityContainer.cs
- SystemSounds.cs
- CookieProtection.cs
- ListControlBuilder.cs
- Int64Storage.cs
- FixedLineResult.cs
- VectorAnimation.cs
- WorkerRequest.cs
- OleDbRowUpdatedEvent.cs
- RawContentTypeMapper.cs
- DiscoveryDocument.cs
- BitmapEffect.cs
- ImageMap.cs
- EntityKey.cs
- CacheForPrimitiveTypes.cs
- StrokeNodeEnumerator.cs
- BoundPropertyEntry.cs
- PeerOutputChannel.cs
- MenuScrollingVisibilityConverter.cs
- oledbmetadatacollectionnames.cs
- Point4DValueSerializer.cs
- EntityContainer.cs
- BitmapEffectOutputConnector.cs
- FieldBuilder.cs
- designeractionlistschangedeventargs.cs
- DataSetMappper.cs
- RemotingAttributes.cs
- DbDataReader.cs
- UdpDiscoveryMessageFilter.cs
- StatusBar.cs
- CodeExpressionCollection.cs
- UnrecognizedPolicyAssertionElement.cs
- OleDbSchemaGuid.cs
- CrossSiteScriptingValidation.cs
- ThemeableAttribute.cs
- PlanCompilerUtil.cs
- Pair.cs
- BaseDataBoundControlDesigner.cs
- PageCatalogPart.cs
- GridEntryCollection.cs
- CodeParameterDeclarationExpression.cs
- StateItem.cs
- _ListenerResponseStream.cs