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
- SafeEventLogWriteHandle.cs
- DllNotFoundException.cs
- versioninfo.cs
- WindowInteractionStateTracker.cs
- IProvider.cs
- TypedColumnHandler.cs
- DependsOnAttribute.cs
- Cursors.cs
- TypedTableBaseExtensions.cs
- ScrollItemProviderWrapper.cs
- SafeCertificateStore.cs
- AppDomain.cs
- AnonymousIdentificationModule.cs
- MouseCaptureWithinProperty.cs
- ObjectKeyFrameCollection.cs
- SqlAggregateChecker.cs
- BooleanStorage.cs
- COM2PropertyDescriptor.cs
- BamlLocalizationDictionary.cs
- FormViewModeEventArgs.cs
- mediaclock.cs
- RuntimeEnvironment.cs
- SrgsElementFactory.cs
- XmlSchemaChoice.cs
- ListBoxItemWrapperAutomationPeer.cs
- DesigntimeLicenseContextSerializer.cs
- StoreContentChangedEventArgs.cs
- EndpointDispatcherTable.cs
- StylusPointPropertyId.cs
- XhtmlBasicTextBoxAdapter.cs
- ParallelQuery.cs
- FrameworkRichTextComposition.cs
- HttpServerUtilityBase.cs
- ReadOnlyTernaryTree.cs
- WebPartConnectionsEventArgs.cs
- ComplexBindingPropertiesAttribute.cs
- Attachment.cs
- ZipIOLocalFileHeader.cs
- CompilerGeneratedAttribute.cs
- TreeBuilderXamlTranslator.cs
- XmlIlVisitor.cs
- OrderedDictionary.cs
- MergeFilterQuery.cs
- BuilderInfo.cs
- ParseElement.cs
- StylusPointProperty.cs
- AnnotationComponentManager.cs
- SplitterPanel.cs
- WebPartManager.cs
- DataServiceException.cs
- ErrorItem.cs
- RichTextBoxContextMenu.cs
- XmlBinaryReader.cs
- Condition.cs
- KeyFrames.cs
- WebPartAddingEventArgs.cs
- MergablePropertyAttribute.cs
- PageCodeDomTreeGenerator.cs
- SoapCodeExporter.cs
- CacheDependency.cs
- KoreanCalendar.cs
- WebDescriptionAttribute.cs
- _DigestClient.cs
- Int16Animation.cs
- DaylightTime.cs
- TextServicesDisplayAttribute.cs
- DataGridTablesFactory.cs
- BackgroundFormatInfo.cs
- ExternalFile.cs
- Size.cs
- OleDbReferenceCollection.cs
- DataTrigger.cs
- OutputCacheProfileCollection.cs
- graph.cs
- TextTreeUndoUnit.cs
- SqlCharStream.cs
- DbConnectionClosed.cs
- SimpleTypeResolver.cs
- ChangeDirector.cs
- NativeBuffer.cs
- TransformValueSerializer.cs
- WebEventTraceProvider.cs
- GraphicsState.cs
- SystemColorTracker.cs
- IndentTextWriter.cs
- LinearQuaternionKeyFrame.cs
- SimpleWebHandlerParser.cs
- DataGridViewSelectedColumnCollection.cs
- ElapsedEventArgs.cs
- UrlPropertyAttribute.cs
- DataBindingCollection.cs
- FixedTextView.cs
- SspiSecurityTokenProvider.cs
- StateWorkerRequest.cs
- OleAutBinder.cs
- OutputCacheProfile.cs
- TypeConverterHelper.cs
- MinimizableAttributeTypeConverter.cs
- Clipboard.cs
- DateTimeConverter.cs