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
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EdmToObjectNamespaceMap.cs
- ApplicationActivator.cs
- CompilerWrapper.cs
- EventLogPermissionEntry.cs
- Semaphore.cs
- CapabilitiesRule.cs
- EditorPartCollection.cs
- RuleValidation.cs
- ComPlusServiceLoader.cs
- BamlStream.cs
- InstanceContext.cs
- BaseTreeIterator.cs
- XmlDataProvider.cs
- XNameConverter.cs
- DescendantOverDescendantQuery.cs
- LocationSectionRecord.cs
- DrawListViewSubItemEventArgs.cs
- HostingMessageProperty.cs
- MethodMessage.cs
- XsdCachingReader.cs
- AtomMaterializerLog.cs
- TagPrefixAttribute.cs
- NotifyInputEventArgs.cs
- EncodingTable.cs
- ColumnWidthChangedEvent.cs
- WebPartCollection.cs
- CharEnumerator.cs
- ParameterCollectionEditorForm.cs
- SyndicationCategory.cs
- ToolStripLocationCancelEventArgs.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- PeerInvitationResponse.cs
- SharedPersonalizationStateInfo.cs
- WeakKeyDictionary.cs
- DeferredTextReference.cs
- PersonalizationDictionary.cs
- Timer.cs
- SerialReceived.cs
- ComponentManagerBroker.cs
- AspNetRouteServiceHttpHandler.cs
- MustUnderstandBehavior.cs
- DispatcherEventArgs.cs
- SQLSingleStorage.cs
- ScrollData.cs
- PasswordPropertyTextAttribute.cs
- InternalResources.cs
- SqlSupersetValidator.cs
- _ServiceNameStore.cs
- HtmlWindow.cs
- SqlClientMetaDataCollectionNames.cs
- ResXResourceReader.cs
- ColumnResizeAdorner.cs
- DataGridViewColumnHeaderCell.cs
- ActiveXContainer.cs
- XmlSignificantWhitespace.cs
- AttachInfo.cs
- SHA384.cs
- MailAddressCollection.cs
- PersonalizationProviderHelper.cs
- FacetDescription.cs
- SoapException.cs
- HttpRuntime.cs
- StateDesigner.cs
- CoTaskMemHandle.cs
- OleDbException.cs
- MatrixAnimationUsingPath.cs
- DataSourceNameHandler.cs
- ImageButton.cs
- ServerProtocol.cs
- DeobfuscatingStream.cs
- CompareInfo.cs
- RelationshipManager.cs
- InvalidCommandTreeException.cs
- IdentityModelStringsVersion1.cs
- DataGridGeneralPage.cs
- WorkflowOperationErrorHandler.cs
- TypePropertyEditor.cs
- ScaleTransform.cs
- TreeViewDesigner.cs
- ChildTable.cs
- ConnectionPointGlyph.cs
- SignatureHelper.cs
- MutexSecurity.cs
- ExtensionQuery.cs
- QueryOutputWriter.cs
- BindingNavigator.cs
- InProcStateClientManager.cs
- MetadataException.cs
- StateValidator.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- NullToBooleanConverter.cs
- PointLight.cs
- DataGridViewCellValidatingEventArgs.cs
- RuleRef.cs
- XamlReader.cs
- EntityViewGenerator.cs
- dsa.cs
- ResourceContainer.cs
- assemblycache.cs
- AdRotator.cs