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
- Hash.cs
- ResXFileRef.cs
- TypeForwardedToAttribute.cs
- QueryInterceptorAttribute.cs
- HierarchicalDataSourceConverter.cs
- AttachInfo.cs
- XmlILConstructAnalyzer.cs
- BindingGroup.cs
- updatecommandorderer.cs
- SecurityKeyIdentifierClause.cs
- TransformProviderWrapper.cs
- Decimal.cs
- XmlAutoDetectWriter.cs
- AlternateView.cs
- ExpressionConverter.cs
- codemethodreferenceexpression.cs
- GroupQuery.cs
- HandlerMappingMemo.cs
- XmlAutoDetectWriter.cs
- StreamingContext.cs
- RuleProcessor.cs
- Scanner.cs
- WebPartTransformerAttribute.cs
- FlowLayoutPanel.cs
- RuleSettingsCollection.cs
- AccessDataSourceView.cs
- BaseCodePageEncoding.cs
- CodeFieldReferenceExpression.cs
- Menu.cs
- FormsAuthenticationCredentials.cs
- StateManagedCollection.cs
- ToolStripPanelRow.cs
- CodeDOMProvider.cs
- OleDragDropHandler.cs
- PeerUnsafeNativeCryptMethods.cs
- ShaderRenderModeValidation.cs
- ExtensionCollection.cs
- DesignTimeDataBinding.cs
- Filter.cs
- SqlResolver.cs
- Quaternion.cs
- AuthenticationModuleElement.cs
- HttpHeaderCollection.cs
- ImageIndexConverter.cs
- WindowsStreamSecurityElement.cs
- SoapServerProtocol.cs
- TreeNodeMouseHoverEvent.cs
- SecurityTokenRequirement.cs
- DateTimeConverter2.cs
- DataGridViewBindingCompleteEventArgs.cs
- DataGridToolTip.cs
- LookupBindingPropertiesAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- DebugHandleTracker.cs
- CFStream.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- SoapAttributeOverrides.cs
- OdbcError.cs
- SQLMoneyStorage.cs
- Control.cs
- InvalidAsynchronousStateException.cs
- UnmanagedHandle.cs
- HostExecutionContextManager.cs
- SQLBytesStorage.cs
- DeleteWorkflowOwnerCommand.cs
- TextEditorCopyPaste.cs
- HttpWebRequest.cs
- ShellProvider.cs
- DbConnectionPoolOptions.cs
- RangeExpression.cs
- Italic.cs
- BooleanAnimationBase.cs
- OleAutBinder.cs
- PhoneCallDesigner.cs
- OperationInfoBase.cs
- ObjectCache.cs
- URI.cs
- CalendarDateRangeChangingEventArgs.cs
- SqlMethodTransformer.cs
- RsaSecurityTokenParameters.cs
- CultureInfo.cs
- Animatable.cs
- Relationship.cs
- ReferencedAssembly.cs
- TagMapInfo.cs
- InputBinder.cs
- DrawingState.cs
- Internal.cs
- SQLBinaryStorage.cs
- ParserHooks.cs
- GPPOINT.cs
- IsolatedStorage.cs
- ThemeDirectoryCompiler.cs
- ResourceCategoryAttribute.cs
- MembershipSection.cs
- ProfilePropertyNameValidator.cs
- XmlSchemaAll.cs
- StringBuilder.cs
- Mutex.cs
- BaseEntityWrapper.cs