Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- StateMachineSubscription.cs
- ManifestResourceInfo.cs
- StyleXamlTreeBuilder.cs
- ResourceDescriptionAttribute.cs
- SamlAttributeStatement.cs
- URIFormatException.cs
- Clause.cs
- JsonWriter.cs
- SessionStateSection.cs
- AccessDataSourceDesigner.cs
- SuppressIldasmAttribute.cs
- XhtmlBasicLinkAdapter.cs
- StaticResourceExtension.cs
- ColorContextHelper.cs
- VirtualDirectoryMappingCollection.cs
- CodeMethodMap.cs
- PropertyEmitter.cs
- ToolStripItemTextRenderEventArgs.cs
- OverflowException.cs
- SystemInformation.cs
- PriorityChain.cs
- ContentElementAutomationPeer.cs
- FileDataSourceCache.cs
- PointLightBase.cs
- WebServiceResponseDesigner.cs
- DocumentGridPage.cs
- Utils.cs
- QilTernary.cs
- WorkflowExecutor.cs
- SpeakProgressEventArgs.cs
- DataFieldConverter.cs
- SourceFileBuildProvider.cs
- HttpRuntime.cs
- Quaternion.cs
- DbConnectionHelper.cs
- RemoteDebugger.cs
- RemotingConfigParser.cs
- PerSessionInstanceContextProvider.cs
- RangeExpression.cs
- ProfileBuildProvider.cs
- SynchronizationScope.cs
- ResourceContainer.cs
- TypeInfo.cs
- WebPartCancelEventArgs.cs
- InternalBufferOverflowException.cs
- RotationValidation.cs
- SmtpClient.cs
- CompiledRegexRunnerFactory.cs
- Calendar.cs
- PathGradientBrush.cs
- TrustSection.cs
- _SafeNetHandles.cs
- DescendantQuery.cs
- PixelShader.cs
- OdbcConnectionString.cs
- TargetPerspective.cs
- RequestCacheManager.cs
- UrlMappingCollection.cs
- LocalizationCodeDomSerializer.cs
- XmlDownloadManager.cs
- SqlDataSourceQueryEditor.cs
- BitVector32.cs
- DetailsViewInsertedEventArgs.cs
- QuotedStringWriteStateInfo.cs
- MDIControlStrip.cs
- InvalidAsynchronousStateException.cs
- OleDbPropertySetGuid.cs
- TypeDescriptionProvider.cs
- CodeTypeConstructor.cs
- IOException.cs
- CustomAttribute.cs
- WebPartsPersonalization.cs
- CustomErrorCollection.cs
- HashCodeCombiner.cs
- ListViewTableRow.cs
- ObjectQuery_EntitySqlExtensions.cs
- NativeMethods.cs
- Graphics.cs
- ElementHostAutomationPeer.cs
- XmlNodeReader.cs
- MarkupProperty.cs
- XmlSerializationWriter.cs
- TextMetrics.cs
- SimpleTextLine.cs
- CollectionViewProxy.cs
- SqlTypeSystemProvider.cs
- BeginGetFileNameFromUserRequest.cs
- LoginName.cs
- TraceUtils.cs
- TraceSection.cs
- EntityReference.cs
- CollaborationHelperFunctions.cs
- UserControlBuildProvider.cs
- ParserStreamGeometryContext.cs
- MetaChildrenColumn.cs
- NodeCounter.cs
- ComponentRenameEvent.cs
- DragDrop.cs
- ProfileBuildProvider.cs
- ComponentManagerBroker.cs