Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- Utils.cs
- SafeNativeMethods.cs
- MatrixKeyFrameCollection.cs
- EDesignUtil.cs
- AtlasWeb.Designer.cs
- RawStylusActions.cs
- EntityWithChangeTrackerStrategy.cs
- ToolStripControlHost.cs
- RequestCache.cs
- ClrPerspective.cs
- FormViewPageEventArgs.cs
- SoapElementAttribute.cs
- DbTypeMap.cs
- TabItemWrapperAutomationPeer.cs
- CheckBoxBaseAdapter.cs
- CssStyleCollection.cs
- AuthenticationServiceManager.cs
- RecognitionEventArgs.cs
- TogglePatternIdentifiers.cs
- SessionEndingEventArgs.cs
- Pkcs9Attribute.cs
- Label.cs
- OracleEncoding.cs
- CodePageUtils.cs
- Matrix3DConverter.cs
- PropertyExpression.cs
- MasterPageCodeDomTreeGenerator.cs
- DataGridViewRowEventArgs.cs
- XmlSchemaChoice.cs
- HuffmanTree.cs
- Exceptions.cs
- CqlParserHelpers.cs
- PathNode.cs
- ObjectTag.cs
- RightsManagementInformation.cs
- BooleanFacetDescriptionElement.cs
- ContentFilePart.cs
- GZipUtils.cs
- HashAlgorithm.cs
- MatrixAnimationBase.cs
- UnhandledExceptionEventArgs.cs
- PointAnimationUsingPath.cs
- CompoundFileDeflateTransform.cs
- FastPropertyAccessor.cs
- NavigationService.cs
- arc.cs
- HttpModuleAction.cs
- DataRow.cs
- ListBoxItemAutomationPeer.cs
- SoapCodeExporter.cs
- ToolStripAdornerWindowService.cs
- TimeManager.cs
- mactripleDES.cs
- AlignmentXValidation.cs
- _ListenerAsyncResult.cs
- CrossContextChannel.cs
- DefaultHttpHandler.cs
- FilterQueryOptionExpression.cs
- AuthorizationRule.cs
- BinaryFormatter.cs
- TextPattern.cs
- RouteItem.cs
- CroppedBitmap.cs
- DetailsViewRowCollection.cs
- MetabaseReader.cs
- FixedTextContainer.cs
- XmlUtilWriter.cs
- IdentifierService.cs
- unitconverter.cs
- FontFaceLayoutInfo.cs
- UpdateEventArgs.cs
- ServiceMetadataExtension.cs
- StringInfo.cs
- StructureChangedEventArgs.cs
- TimerElapsedEvenArgs.cs
- CustomLineCap.cs
- ContextMenu.cs
- GroupBox.cs
- CustomSignedXml.cs
- QilList.cs
- SizeChangedEventArgs.cs
- QilTargetType.cs
- RequestDescription.cs
- DataColumn.cs
- DataTemplateSelector.cs
- ElementNotAvailableException.cs
- DelimitedListTraceListener.cs
- XmlSchemaFacet.cs
- RemotingException.cs
- EntityDataSourceStatementEditorForm.cs
- BuildManagerHost.cs
- Evidence.cs
- AssemblyAttributes.cs
- LinkTarget.cs
- LateBoundChannelParameterCollection.cs
- dbenumerator.cs
- PropertyEmitter.cs
- CustomWebEventKey.cs
- Oid.cs
- Method.cs