Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathArrayIterator.cs / 3 / XPathArrayIterator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //----------------------------------------------------------------------------- namespace MS.Internal.Xml.XPath { using System; using System.Xml; using System.Xml.XPath; using System.Diagnostics; using System.Globalization; using System.Collections; [DebuggerDisplay("Position={CurrentPosition}, Current={debuggerDisplayProxy, nq}")] internal class XPathArrayIterator : ResetableIterator { protected IList list; protected int index; public XPathArrayIterator(IList list) { this.list = list; } public XPathArrayIterator(XPathArrayIterator it) { this.list = it.list; this.index = it.index; } public XPathArrayIterator(XPathNodeIterator nodeIterator) { this.list = new ArrayList(); while (nodeIterator.MoveNext()) { this.list.Add(nodeIterator.Current.Clone()); } } public IList AsList { get { return this.list; } } public override XPathNodeIterator Clone() { return new XPathArrayIterator(this); } public override XPathNavigator Current { get { Debug.Assert(index <= list.Count); if (index < 1) throw new InvalidOperationException(Res.GetString(Res.Sch_EnumNotStarted, string.Empty)); return (XPathNavigator) list[index - 1]; } } public override int CurrentPosition { get { return index; } } public override int Count { get { return list.Count; } } public override bool MoveNext() { Debug.Assert(index <= list.Count); if (index == list.Count) { return false; } index++; return true; } public override void Reset() { index = 0; } public override IEnumerator GetEnumerator() { return list.GetEnumerator(); } private object debuggerDisplayProxy { get { return index < 1 ? null : (object)new XPathNavigator.DebuggerDisplayProxy(Current); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerActionItem.cs
- httpstaticobjectscollection.cs
- MailDefinitionBodyFileNameEditor.cs
- BaseComponentEditor.cs
- HelpFileFileNameEditor.cs
- ContentValidator.cs
- UriTemplateTable.cs
- NotifyCollectionChangedEventArgs.cs
- StructuredTypeInfo.cs
- FormattedText.cs
- SRGSCompiler.cs
- XmlDeclaration.cs
- Base64Encoding.cs
- DebugView.cs
- PasswordBoxAutomationPeer.cs
- PathParser.cs
- TreeSet.cs
- CodeSnippetCompileUnit.cs
- UrlPropertyAttribute.cs
- WebPartConnectionsDisconnectVerb.cs
- Function.cs
- AsynchronousChannel.cs
- FrameDimension.cs
- SendMailErrorEventArgs.cs
- DataGridRelationshipRow.cs
- StrokeFIndices.cs
- CapabilitiesUse.cs
- Parser.cs
- EntityDataSourceDesignerHelper.cs
- SynchronousChannel.cs
- BuildResult.cs
- ReadOnlyMetadataCollection.cs
- NameValueFileSectionHandler.cs
- _ChunkParse.cs
- GestureRecognizer.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- elementinformation.cs
- MailAddress.cs
- ClientScriptItemCollection.cs
- StyleBamlRecordReader.cs
- Path.cs
- CodeObject.cs
- XmlNamespaceManager.cs
- GridViewColumnHeader.cs
- Transform3D.cs
- _AutoWebProxyScriptEngine.cs
- RouteCollection.cs
- SortableBindingList.cs
- WindowsScrollBarBits.cs
- DependencyPropertyAttribute.cs
- ReadOnlyTernaryTree.cs
- Timeline.cs
- Rectangle.cs
- ConfigUtil.cs
- DataGridRowEventArgs.cs
- RequestQueue.cs
- SqlDesignerDataSourceView.cs
- InvalidDataException.cs
- Profiler.cs
- PackageRelationshipSelector.cs
- HttpCookiesSection.cs
- CrossAppDomainChannel.cs
- SEHException.cs
- DataGridViewComboBoxEditingControl.cs
- Block.cs
- DateTimeOffsetAdapter.cs
- X509ChainElement.cs
- EventOpcode.cs
- ColorAnimation.cs
- TypeForwardedToAttribute.cs
- Attachment.cs
- StateMachine.cs
- Effect.cs
- SessionEndingEventArgs.cs
- SafeFileMapViewHandle.cs
- X509InitiatorCertificateServiceElement.cs
- MouseButtonEventArgs.cs
- DirectionalLight.cs
- ResourceAssociationSetEnd.cs
- Int32Storage.cs
- XamlToRtfParser.cs
- EntityCommand.cs
- SecurityIdentifierElementCollection.cs
- ExpanderAutomationPeer.cs
- CharacterString.cs
- CodeSubDirectory.cs
- DataGridViewCheckBoxColumn.cs
- XmlAtomErrorReader.cs
- BindingSource.cs
- WebPartChrome.cs
- MessageVersion.cs
- MatrixStack.cs
- EventLogEntryCollection.cs
- ListViewContainer.cs
- basemetadatamappingvisitor.cs
- TableHeaderCell.cs
- TextEffectResolver.cs
- PeerNameResolver.cs
- COM2PictureConverter.cs
- IndentedWriter.cs