Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / Xml / System / Xml / Dom / XmlChildEnumerator.cs / 1 / XmlChildEnumerator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System.Collections; internal sealed class XmlChildEnumerator: IEnumerator { internal XmlNode container; internal XmlNode child; internal bool isFirst; internal XmlChildEnumerator( XmlNode container ) { this.container = container; this.child = container.FirstChild; this.isFirst = true; } bool IEnumerator.MoveNext() { return this.MoveNext(); } internal bool MoveNext() { if (isFirst) { child = container.FirstChild; isFirst = false; } else if (child != null) { child = child.NextSibling; } return child != null; } void IEnumerator.Reset() { isFirst = true; child = container.FirstChild; } object IEnumerator.Current { get { return this.Current; } } internal XmlNode Current { get { if (isFirst || child == null) throw new InvalidOperationException(Res.GetString(Res.Xml_InvalidOperation)); return child; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace System.Xml { using System.Collections; internal sealed class XmlChildEnumerator: IEnumerator { internal XmlNode container; internal XmlNode child; internal bool isFirst; internal XmlChildEnumerator( XmlNode container ) { this.container = container; this.child = container.FirstChild; this.isFirst = true; } bool IEnumerator.MoveNext() { return this.MoveNext(); } internal bool MoveNext() { if (isFirst) { child = container.FirstChild; isFirst = false; } else if (child != null) { child = child.NextSibling; } return child != null; } void IEnumerator.Reset() { isFirst = true; child = container.FirstChild; } object IEnumerator.Current { get { return this.Current; } } internal XmlNode Current { get { if (isFirst || child == null) throw new InvalidOperationException(Res.GetString(Res.Xml_InvalidOperation)); return child; } } } } // 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
- HandleValueEditor.cs
- ToolBarButtonDesigner.cs
- MouseGestureValueSerializer.cs
- Cell.cs
- DataReceivedEventArgs.cs
- StreamingContext.cs
- MatcherBuilder.cs
- ValueSerializer.cs
- milrender.cs
- UntrustedRecipientException.cs
- XmlUnspecifiedAttribute.cs
- StatusBarPanelClickEvent.cs
- CommentAction.cs
- DefaultWorkflowSchedulerService.cs
- ObjectTypeMapping.cs
- SamlConstants.cs
- ShaderEffect.cs
- DocumentViewerConstants.cs
- SQLDateTime.cs
- EncodingFallbackAwareXmlTextWriter.cs
- AppSettingsReader.cs
- OrderedDictionaryStateHelper.cs
- HttpDictionary.cs
- TextOnlyOutput.cs
- ByteArrayHelperWithString.cs
- PropertyDescriptorGridEntry.cs
- DataGridHeadersVisibilityToVisibilityConverter.cs
- CryptoStream.cs
- RunInstallerAttribute.cs
- DesignerVerbCollection.cs
- MenuCommands.cs
- CacheMode.cs
- BaseInfoTable.cs
- GregorianCalendarHelper.cs
- SchemaTableOptionalColumn.cs
- ClientSponsor.cs
- SafeNativeMethodsOther.cs
- KeyPullup.cs
- SimpleWorkerRequest.cs
- ItemContainerPattern.cs
- PropertyRecord.cs
- ParagraphVisual.cs
- PanningMessageFilter.cs
- RelatedCurrencyManager.cs
- UriScheme.cs
- CommonRemoteMemoryBlock.cs
- PolicyException.cs
- UriExt.cs
- DelegatedStream.cs
- Inline.cs
- ZipFileInfo.cs
- DiscoveryClientDocuments.cs
- DiagnosticStrings.cs
- ProcessRequestArgs.cs
- Deflater.cs
- UInt64.cs
- TabRenderer.cs
- ComplexLine.cs
- KeyConverter.cs
- LinqDataSourceDeleteEventArgs.cs
- SecurityValidationBehavior.cs
- XmlSiteMapProvider.cs
- ReadOnlyNameValueCollection.cs
- OverflowException.cs
- RecordsAffectedEventArgs.cs
- Pair.cs
- DependencyPropertyConverter.cs
- LinkArea.cs
- ResXBuildProvider.cs
- VarRefManager.cs
- WebPartZone.cs
- TextRenderingModeValidation.cs
- ToolStripItemRenderEventArgs.cs
- WorkflowInstanceRecord.cs
- SecurityManager.cs
- XhtmlBasicFormAdapter.cs
- ViewBase.cs
- Profiler.cs
- ToolBarOverflowPanel.cs
- SmtpFailedRecipientsException.cs
- ConsoleEntryPoint.cs
- TraceFilter.cs
- MouseEventArgs.cs
- XmlWrappingWriter.cs
- AnnotationObservableCollection.cs
- WebPartMenu.cs
- BitStack.cs
- ByteStreamGeometryContext.cs
- CellLabel.cs
- WebPartTracker.cs
- BehaviorDragDropEventArgs.cs
- StylusPointPropertyInfoDefaults.cs
- ProcessModelInfo.cs
- Highlights.cs
- FormatConvertedBitmap.cs
- RadioButton.cs
- ByteStream.cs
- WeakRefEnumerator.cs
- ThreadNeutralSemaphore.cs
- SqlXml.cs