Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- PeerResolver.cs
- Path.cs
- DynamicActivityProperty.cs
- XmlSchemaException.cs
- FastEncoder.cs
- SimpleHandlerBuildProvider.cs
- PenLineCapValidation.cs
- ExclusiveCanonicalizationTransform.cs
- EntryIndex.cs
- connectionpool.cs
- DataGridViewRowPrePaintEventArgs.cs
- StateBag.cs
- CaseInsensitiveOrdinalStringComparer.cs
- TextFragmentEngine.cs
- XmlAttributeOverrides.cs
- ActiveXContainer.cs
- FrugalMap.cs
- BeginStoryboard.cs
- WebHttpBehavior.cs
- CharStorage.cs
- Border.cs
- CodeVariableDeclarationStatement.cs
- HttpCapabilitiesBase.cs
- ParameterRetriever.cs
- Path.cs
- ExtentCqlBlock.cs
- PaintEvent.cs
- ClipboardData.cs
- XmlToDatasetMap.cs
- AggregateNode.cs
- Visual3DCollection.cs
- RouteValueExpressionBuilder.cs
- MdImport.cs
- ISAPIRuntime.cs
- DiscoveryReferences.cs
- ReferenceConverter.cs
- DialogWindow.cs
- XmlImplementation.cs
- Transform3D.cs
- GC.cs
- XmlIncludeAttribute.cs
- XmlLinkedNode.cs
- GacUtil.cs
- PtsHost.cs
- Condition.cs
- HttpsTransportElement.cs
- ApplicationId.cs
- KnownColorTable.cs
- CreateUserWizard.cs
- Hex.cs
- Model3DCollection.cs
- SessionPageStatePersister.cs
- NullRuntimeConfig.cs
- XNodeNavigator.cs
- SafeRegistryKey.cs
- ResourcePermissionBaseEntry.cs
- DeclarativeCatalogPart.cs
- MimeReturn.cs
- HttpCapabilitiesBase.cs
- NegotiationTokenAuthenticator.cs
- IssuedTokenClientBehaviorsElement.cs
- OdbcConnectionString.cs
- XPathAncestorQuery.cs
- Classification.cs
- ThreadSafeList.cs
- BaseHashHelper.cs
- DateTimeSerializationSection.cs
- TableLayout.cs
- NodeInfo.cs
- MouseActionValueSerializer.cs
- ListViewItem.cs
- PackageRelationshipSelector.cs
- CSharpCodeProvider.cs
- NTAccount.cs
- CollectionViewSource.cs
- NativeMethods.cs
- GcHandle.cs
- RepeaterItemEventArgs.cs
- BaseCollection.cs
- AnnotationDocumentPaginator.cs
- EnvelopedSignatureTransform.cs
- Pair.cs
- EdmItemCollection.cs
- SafeCoTaskMem.cs
- VScrollBar.cs
- AttributeSetAction.cs
- WebPartAuthorizationEventArgs.cs
- MaskPropertyEditor.cs
- HttpWriter.cs
- EffectiveValueEntry.cs
- FileDialog_Vista.cs
- Evaluator.cs
- DrawingDrawingContext.cs
- DataServiceQueryOfT.cs
- WorkflowViewStateService.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Socket.cs
- SqlConnectionManager.cs
- TypedLocationWrapper.cs