Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / XmlUtils / System / Xml / Xsl / Runtime / XmlIterators.cs / 1305376 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TemplateComponentConnector.cs
- WorkflowEventArgs.cs
- TabControlEvent.cs
- AppDomainInstanceProvider.cs
- ColorConvertedBitmap.cs
- CopyCodeAction.cs
- HyperLinkField.cs
- QuaternionKeyFrameCollection.cs
- MethodToken.cs
- BoolLiteral.cs
- EncodingDataItem.cs
- ReversePositionQuery.cs
- EmbeddedMailObjectsCollection.cs
- ConstraintStruct.cs
- ADConnectionHelper.cs
- LogSwitch.cs
- BaseProcessor.cs
- TableRowsCollectionEditor.cs
- SecurityTokenException.cs
- ToolStripSystemRenderer.cs
- KeySpline.cs
- EmissiveMaterial.cs
- EventDescriptor.cs
- sqlpipe.cs
- XmlNamedNodeMap.cs
- SequenceDesigner.cs
- ForceCopyBuildProvider.cs
- SqlCommand.cs
- Conditional.cs
- BulletChrome.cs
- WindowsListViewItem.cs
- SqlDataSource.cs
- WebPartAuthorizationEventArgs.cs
- DbDataReader.cs
- SamlConstants.cs
- PublishLicense.cs
- BitmapMetadataEnumerator.cs
- InsufficientMemoryException.cs
- SplitterEvent.cs
- LocalIdKeyIdentifierClause.cs
- SmtpNetworkElement.cs
- TableHeaderCell.cs
- DbConnectionStringBuilder.cs
- CellLabel.cs
- HtmlShim.cs
- SqlBuffer.cs
- TransformerInfo.cs
- SafeMemoryMappedFileHandle.cs
- BindingSourceDesigner.cs
- IndexedString.cs
- ResolveCriteria.cs
- PropertyTabAttribute.cs
- HandleRef.cs
- MetroSerializationManager.cs
- NumericUpDownAcceleration.cs
- regiisutil.cs
- GeneralTransform3D.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- SizeFConverter.cs
- DataGridTextBoxColumn.cs
- FormattedText.cs
- XmlIlVisitor.cs
- GPRECT.cs
- ELinqQueryState.cs
- StateDesigner.Helpers.cs
- TrackingValidationObjectDictionary.cs
- ElementAtQueryOperator.cs
- WebExceptionStatus.cs
- Splitter.cs
- RelatedEnd.cs
- NetPeerTcpBinding.cs
- SelectionListDesigner.cs
- RepeatBehaviorConverter.cs
- ShimAsPublicXamlType.cs
- EventLogException.cs
- TypeUsage.cs
- EventDescriptorCollection.cs
- cookiecontainer.cs
- OwnerDrawPropertyBag.cs
- WinFormsUtils.cs
- _TimerThread.cs
- WaitHandle.cs
- PackageFilter.cs
- ConfigurationCollectionAttribute.cs
- StrokeCollectionConverter.cs
- ActivityPropertyReference.cs
- FileDialogPermission.cs
- TextStore.cs
- WhitespaceRuleLookup.cs
- ButtonChrome.cs
- ProjectionNode.cs
- DataTableReaderListener.cs
- CookieProtection.cs
- Gdiplus.cs
- ImpersonateTokenRef.cs
- FilterQuery.cs
- SafeRightsManagementSessionHandle.cs
- WebSysDefaultValueAttribute.cs
- StateDesigner.Layouts.cs
- MemberAccessException.cs