Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- XslCompiledTransform.cs
- ADConnectionHelper.cs
- MultipartIdentifier.cs
- DbModificationCommandTree.cs
- AttachedAnnotation.cs
- BasicBrowserDialog.designer.cs
- ReadOnlyAttribute.cs
- SystemIcons.cs
- WebBrowserHelper.cs
- FixedSOMTableRow.cs
- Camera.cs
- SQLMembershipProvider.cs
- RelatedImageListAttribute.cs
- ProxySimple.cs
- NullExtension.cs
- TextFormatter.cs
- EdgeModeValidation.cs
- LinkTarget.cs
- ElementsClipboardData.cs
- FlowPosition.cs
- BitmapPalettes.cs
- Control.cs
- SqlTrackingService.cs
- Sql8ConformanceChecker.cs
- ContextMenuAutomationPeer.cs
- StateBag.cs
- OneOfConst.cs
- TargetControlTypeCache.cs
- ConfigXmlElement.cs
- WebService.cs
- CategoryEditor.cs
- AstTree.cs
- Container.cs
- HtmlWindowCollection.cs
- ContentPlaceHolder.cs
- Enum.cs
- AttributeXamlType.cs
- AbsoluteQuery.cs
- RIPEMD160Managed.cs
- DecoderReplacementFallback.cs
- SymbolTable.cs
- OutputCacheProfile.cs
- XmlSchemaValidationException.cs
- BamlResourceDeserializer.cs
- DataKeyCollection.cs
- SectionInformation.cs
- WpfPayload.cs
- PrintSchema.cs
- DataGridViewTopLeftHeaderCell.cs
- SqlBuffer.cs
- XPathNavigatorKeyComparer.cs
- NamespaceTable.cs
- OdbcTransaction.cs
- XmlSchemaType.cs
- WithStatement.cs
- DriveNotFoundException.cs
- MetadataArtifactLoaderResource.cs
- CapabilitiesRule.cs
- SqlError.cs
- UnaryExpression.cs
- UIServiceHelper.cs
- RuntimeWrappedException.cs
- BlobPersonalizationState.cs
- FixedTextContainer.cs
- WindowPatternIdentifiers.cs
- SrgsGrammarCompiler.cs
- GlyphingCache.cs
- TextTreeInsertElementUndoUnit.cs
- OrderByBuilder.cs
- HtmlEmptyTagControlBuilder.cs
- XslException.cs
- SystemWebExtensionsSectionGroup.cs
- LabelLiteral.cs
- InternalsVisibleToAttribute.cs
- IOThreadTimer.cs
- DataGridViewControlCollection.cs
- Rijndael.cs
- Tokenizer.cs
- CapabilitiesAssignment.cs
- WebPartHeaderCloseVerb.cs
- DataServiceBehavior.cs
- VariableQuery.cs
- PathTooLongException.cs
- WebPartManagerInternals.cs
- XsltInput.cs
- InfoCardClaimCollection.cs
- BaseCodePageEncoding.cs
- FolderBrowserDialog.cs
- PermissionSet.cs
- ApplicationId.cs
- SQLResource.cs
- TypeSystemHelpers.cs
- XPathMessageFilterElementCollection.cs
- ContextQuery.cs
- QueryOutputWriter.cs
- DetailsViewRowCollection.cs
- ProfileProvider.cs
- RadioButtonStandardAdapter.cs
- QuerySelectOp.cs
- BaseDataBoundControl.cs