Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / XmlUtils / System / Xml / Xsl / Runtime / XmlIterators.cs / 1 / XmlIterators.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Xml; using System.Xml.XPath; using System.ComponentModel; namespace System.Xml.Xsl.Runtime { ////// Iterators that use containment to control a nested iterator return one of the following values from MoveNext(). /// [EditorBrowsable(EditorBrowsableState.Never)] public enum IteratorResult { NoMoreNodes, // Iteration is complete; there are no more nodes NeedInputNode, // The next node needs to be fetched from the contained iterator before iteration can continue HaveCurrentNode, // This iterator's Current property is set to the next node in the iteration }; ////// Tokenize a string containing IDREF values and deref the values in order to get a list of ID elements. /// [EditorBrowsable(EditorBrowsableState.Never)] public struct IdIterator { private XPathNavigator navCurrent; private string[] idrefs; private int idx; public void Create(XPathNavigator context, string value) { this.navCurrent = XmlQueryRuntime.SyncToNavigator(this.navCurrent, context); this.idrefs = XmlConvert.SplitString(value); this.idx = -1; } public bool MoveNext() { do { this.idx++; if (this.idx >= idrefs.Length) return false; } while (!this.navCurrent.MoveToId(this.idrefs[this.idx])); return true; } ////// Return the current result navigator. This is only defined after MoveNext() has returned true. /// public XPathNavigator Current { get { return this.navCurrent; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- using System; using System.Xml; using System.Xml.XPath; using System.ComponentModel; namespace System.Xml.Xsl.Runtime { ////// Iterators that use containment to control a nested iterator return one of the following values from MoveNext(). /// [EditorBrowsable(EditorBrowsableState.Never)] public enum IteratorResult { NoMoreNodes, // Iteration is complete; there are no more nodes NeedInputNode, // The next node needs to be fetched from the contained iterator before iteration can continue HaveCurrentNode, // This iterator's Current property is set to the next node in the iteration }; ////// Tokenize a string containing IDREF values and deref the values in order to get a list of ID elements. /// [EditorBrowsable(EditorBrowsableState.Never)] public struct IdIterator { private XPathNavigator navCurrent; private string[] idrefs; private int idx; public void Create(XPathNavigator context, string value) { this.navCurrent = XmlQueryRuntime.SyncToNavigator(this.navCurrent, context); this.idrefs = XmlConvert.SplitString(value); this.idx = -1; } public bool MoveNext() { do { this.idx++; if (this.idx >= idrefs.Length) return false; } while (!this.navCurrent.MoveToId(this.idrefs[this.idx])); return true; } ////// Return the current result navigator. This is only defined after MoveNext() has returned true. /// public XPathNavigator Current { get { return this.navCurrent; } } } } // 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
- TransformerConfigurationWizardBase.cs
- StateBag.cs
- ElementUtil.cs
- DeclarativeCatalogPart.cs
- FullTextBreakpoint.cs
- ModelItemImpl.cs
- TcpProcessProtocolHandler.cs
- TextBoxAutoCompleteSourceConverter.cs
- DataGridHyperlinkColumn.cs
- UriScheme.cs
- ConfigXmlReader.cs
- CrossContextChannel.cs
- ElementMarkupObject.cs
- Cursors.cs
- XmlReader.cs
- CompatibleComparer.cs
- CodeValidator.cs
- RowsCopiedEventArgs.cs
- CurrencyWrapper.cs
- RSAProtectedConfigurationProvider.cs
- Line.cs
- LongValidator.cs
- SmtpTransport.cs
- AlternateViewCollection.cs
- OleDbRowUpdatingEvent.cs
- _ListenerResponseStream.cs
- ValidatorCompatibilityHelper.cs
- CallbackValidator.cs
- AutomationAttributeInfo.cs
- CodeIterationStatement.cs
- PropertyItemInternal.cs
- ISSmlParser.cs
- StylusShape.cs
- VerticalAlignConverter.cs
- TextDecorations.cs
- DrawToolTipEventArgs.cs
- CryptoApi.cs
- SafeRightsManagementPubHandle.cs
- XmlReflectionMember.cs
- SpellerError.cs
- EdmToObjectNamespaceMap.cs
- SmiSettersStream.cs
- StateChangeEvent.cs
- DecimalKeyFrameCollection.cs
- ReachIDocumentPaginatorSerializer.cs
- DLinqDataModelProvider.cs
- WorkflowWebHostingModule.cs
- ColumnResizeUndoUnit.cs
- AmbientLight.cs
- HtmlAnchor.cs
- VerticalConnector.xaml.cs
- RadialGradientBrush.cs
- SerializationInfo.cs
- RemoteCryptoDecryptRequest.cs
- DoubleIndependentAnimationStorage.cs
- KeyBinding.cs
- GridViewPageEventArgs.cs
- FixedPosition.cs
- TargetException.cs
- Win32SafeHandles.cs
- IOThreadScheduler.cs
- TimestampInformation.cs
- PenLineJoinValidation.cs
- ActivationServices.cs
- GlyphShapingProperties.cs
- ListItemViewAttribute.cs
- DesignParameter.cs
- Pair.cs
- ToolStripArrowRenderEventArgs.cs
- BitVector32.cs
- HandleCollector.cs
- ListViewGroupItemCollection.cs
- Control.cs
- MyContact.cs
- FixedFindEngine.cs
- ExceptionCollection.cs
- TableCellAutomationPeer.cs
- Adorner.cs
- SystemUnicastIPAddressInformation.cs
- NullRuntimeConfig.cs
- DSACryptoServiceProvider.cs
- WebBrowsableAttribute.cs
- XmlHelper.cs
- DataGridViewTextBoxColumn.cs
- SoapSchemaMember.cs
- NumericPagerField.cs
- DesignerAdRotatorAdapter.cs
- UpdatePanelTriggerCollection.cs
- RegisteredExpandoAttribute.cs
- MLangCodePageEncoding.cs
- keycontainerpermission.cs
- ToolStripKeyboardHandlingService.cs
- NativeMethods.cs
- DebugView.cs
- DataServiceQueryProvider.cs
- ProfessionalColorTable.cs
- SerializationFieldInfo.cs
- ByteAnimationBase.cs
- ConfigurationFileMap.cs
- smtppermission.cs