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
- MediaEntryAttribute.cs
- RoleService.cs
- EncodingTable.cs
- CodeMemberField.cs
- AlternationConverter.cs
- BitmapEffectDrawingContextState.cs
- BCLDebug.cs
- DataRelation.cs
- ProbeMatches11.cs
- Geometry3D.cs
- _PooledStream.cs
- RemotingSurrogateSelector.cs
- ErrorTableItemStyle.cs
- EntityProviderFactory.cs
- BufferedGraphics.cs
- EntityDataSourceContainerNameItem.cs
- TypeToken.cs
- CommonGetThemePartSize.cs
- ProfilePropertySettings.cs
- FlatButtonAppearance.cs
- ListenerTraceUtility.cs
- ScriptComponentDescriptor.cs
- PageTheme.cs
- GrammarBuilder.cs
- ProcessMonitor.cs
- FixedElement.cs
- SafeFileMappingHandle.cs
- KeyValueConfigurationCollection.cs
- HostingEnvironment.cs
- TrackingMemoryStream.cs
- SizeAnimationUsingKeyFrames.cs
- SwitchAttribute.cs
- RunInstallerAttribute.cs
- HMACMD5.cs
- SendSecurityHeaderElement.cs
- Converter.cs
- GenericIdentity.cs
- MsmqBindingFilter.cs
- FormParameter.cs
- ProtocolsConfiguration.cs
- XmlTextEncoder.cs
- SoapReflectionImporter.cs
- FastEncoder.cs
- ReflectionHelper.cs
- ReaderWriterLockWrapper.cs
- ImportCatalogPart.cs
- ADConnectionHelper.cs
- LinqDataSourceStatusEventArgs.cs
- RegexParser.cs
- SqlAliasesReferenced.cs
- BinaryNegotiation.cs
- RegexNode.cs
- Group.cs
- SchemaInfo.cs
- ShapingWorkspace.cs
- FastEncoderWindow.cs
- BrowserCapabilitiesFactory.cs
- XmlSchemaValidationException.cs
- base64Transforms.cs
- Table.cs
- CustomCredentialPolicy.cs
- Deflater.cs
- UIElementParagraph.cs
- TrackingLocationCollection.cs
- ToolStripRenderer.cs
- ContainerControl.cs
- PriorityChain.cs
- SortedList.cs
- XmlRawWriter.cs
- EditorZoneBase.cs
- RadialGradientBrush.cs
- DataSourceCache.cs
- RawMouseInputReport.cs
- HandleCollector.cs
- DependencyProperty.cs
- HttpServerProtocol.cs
- TextTreeTextBlock.cs
- XmlSchemaExternal.cs
- ThemeDictionaryExtension.cs
- ConfigurationConverterBase.cs
- MemoryFailPoint.cs
- Composition.cs
- DesignerSerializationOptionsAttribute.cs
- InstanceCreationEditor.cs
- followingsibling.cs
- SurrogateSelector.cs
- Grant.cs
- shaperfactoryquerycachekey.cs
- TimelineClockCollection.cs
- BitmapSource.cs
- OleDbMetaDataFactory.cs
- RemotingServices.cs
- ToolboxBitmapAttribute.cs
- ProviderConnectionPoint.cs
- SqlColumnizer.cs
- Effect.cs
- BooleanToVisibilityConverter.cs
- DocumentPageHost.cs
- ObjectToModelValueConverter.cs
- RenderingEventArgs.cs