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
- UshortList2.cs
- Identity.cs
- MimePart.cs
- SecurityElement.cs
- SqlConnectionFactory.cs
- XamlWriter.cs
- DelimitedListTraceListener.cs
- HtmlInputImage.cs
- OdbcInfoMessageEvent.cs
- documentsequencetextpointer.cs
- ScriptingJsonSerializationSection.cs
- ResponseBodyWriter.cs
- StandardOleMarshalObject.cs
- QilStrConcat.cs
- SchemaName.cs
- ScriptModule.cs
- ParseChildrenAsPropertiesAttribute.cs
- TextRenderer.cs
- OpCodes.cs
- MultiPropertyDescriptorGridEntry.cs
- CheckBoxList.cs
- FacetChecker.cs
- CheckBox.cs
- HttpConfigurationSystem.cs
- ConnectionStringSettings.cs
- Collection.cs
- EntityException.cs
- ToolStripDropDownClosedEventArgs.cs
- ImportCatalogPart.cs
- Comparer.cs
- GuidTagList.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- QuaternionValueSerializer.cs
- NotSupportedException.cs
- TemplateParser.cs
- Int32Animation.cs
- __Filters.cs
- PropertyDescriptorCollection.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- SqlDependencyListener.cs
- Avt.cs
- DataGridViewCellCancelEventArgs.cs
- BamlWriter.cs
- FunctionImportMapping.cs
- Component.cs
- AssociationTypeEmitter.cs
- XhtmlConformanceSection.cs
- CompoundFileStorageReference.cs
- BindableAttribute.cs
- C14NUtil.cs
- LinqExpressionNormalizer.cs
- ChtmlTextWriter.cs
- TargetPerspective.cs
- CompositionTarget.cs
- Decorator.cs
- CompositeControl.cs
- HttpsChannelListener.cs
- COM2PictureConverter.cs
- TextParaLineResult.cs
- FunctionCommandText.cs
- UnsafeNativeMethods.cs
- NamespaceImport.cs
- FixedSOMLineRanges.cs
- X509PeerCertificateElement.cs
- PageRouteHandler.cs
- CmsInterop.cs
- ChangePassword.cs
- ItemMap.cs
- HebrewCalendar.cs
- NavigatorOutput.cs
- PropertyGeneratedEventArgs.cs
- OperationCanceledException.cs
- GraphicsPath.cs
- StandardCommandToolStripMenuItem.cs
- CryptographicAttribute.cs
- XmlSchemaComplexContentRestriction.cs
- FileVersion.cs
- CollectionBase.cs
- DBNull.cs
- TextParagraphProperties.cs
- ComponentResourceManager.cs
- KernelTypeValidation.cs
- ProcessRequestArgs.cs
- OracleConnectionFactory.cs
- PeerCollaborationPermission.cs
- SerializerWriterEventHandlers.cs
- ManagementObjectSearcher.cs
- ZipIOExtraFieldZip64Element.cs
- DataGridSortCommandEventArgs.cs
- SqlStream.cs
- WebPartEventArgs.cs
- UncommonField.cs
- UnsafeNativeMethods.cs
- ThaiBuddhistCalendar.cs
- SiblingIterators.cs
- ParserExtension.cs
- ScrollViewer.cs
- QuaternionAnimation.cs
- HtmlShimManager.cs
- ComPersistableTypeElement.cs