Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- TextParagraphCache.cs
- PublishLicense.cs
- ItemCollection.cs
- ValueExpressions.cs
- TextCharacters.cs
- DynamicPropertyHolder.cs
- NameTable.cs
- WindowsGraphics2.cs
- ConfigXmlSignificantWhitespace.cs
- AppDomainUnloadedException.cs
- ArgumentException.cs
- MessageDecoder.cs
- CSharpCodeProvider.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ScrollBarAutomationPeer.cs
- SqlConnectionPoolGroupProviderInfo.cs
- RequestBringIntoViewEventArgs.cs
- WebScriptEnablingElement.cs
- httpapplicationstate.cs
- XmlEntity.cs
- precedingquery.cs
- TextTreeTextBlock.cs
- RetriableClipboard.cs
- TemplateField.cs
- WizardStepBase.cs
- ContextMenuStrip.cs
- ExecutionScope.cs
- TraceContext.cs
- HttpRuntimeSection.cs
- HitTestFilterBehavior.cs
- DefaultSettingsSection.cs
- DecodeHelper.cs
- FormatterConverter.cs
- PlainXmlDeserializer.cs
- NameValueCollection.cs
- NullableLongAverageAggregationOperator.cs
- ResourceFallbackManager.cs
- TrackingParameters.cs
- Int32CollectionConverter.cs
- HttpCachePolicy.cs
- PtsContext.cs
- DataContractJsonSerializerOperationBehavior.cs
- CombinedTcpChannel.cs
- ChannelCredentials.cs
- UIntPtr.cs
- DataControlFieldCollection.cs
- RangeValueProviderWrapper.cs
- BaseDataBoundControl.cs
- ColorKeyFrameCollection.cs
- ListView.cs
- RotateTransform3D.cs
- SqlProcedureAttribute.cs
- RequestBringIntoViewEventArgs.cs
- ModelVisual3D.cs
- AssemblyInfo.cs
- ValueOfAction.cs
- XPathDocument.cs
- StateValidator.cs
- Int32CollectionValueSerializer.cs
- DataGridPreparingCellForEditEventArgs.cs
- WebPartHeaderCloseVerb.cs
- Aes.cs
- TdsParserSessionPool.cs
- SeparatorAutomationPeer.cs
- LayoutTableCell.cs
- DelegatingConfigHost.cs
- SamlAuthenticationClaimResource.cs
- SettingsProviderCollection.cs
- CustomCategoryAttribute.cs
- Imaging.cs
- LoadRetryHandler.cs
- Grammar.cs
- Opcode.cs
- CmsInterop.cs
- ProviderCollection.cs
- XmlCharType.cs
- StringSource.cs
- ServiceSecurityAuditElement.cs
- IssuedTokenParametersEndpointAddressElement.cs
- CheckBox.cs
- WebPartDisplayModeCollection.cs
- Version.cs
- BasicExpressionVisitor.cs
- Site.cs
- SubtreeProcessor.cs
- CustomSignedXml.cs
- DesignerWidgets.cs
- HighlightComponent.cs
- Table.cs
- _BufferOffsetSize.cs
- ReflectTypeDescriptionProvider.cs
- XmlSigningNodeWriter.cs
- errorpatternmatcher.cs
- StrokeCollection.cs
- TrustLevel.cs
- ContentType.cs
- FileReservationCollection.cs
- CacheManager.cs
- Assembly.cs
- CreateParams.cs