Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathSingletonIterator.cs / 1 / XPathSingletonIterator.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; internal class XPathSingletonIterator: ResetableIterator { private XPathNavigator nav; private int position; public XPathSingletonIterator(XPathNavigator nav) { Debug.Assert(nav != null); this.nav = nav; } public XPathSingletonIterator(XPathNavigator nav, bool moved) : this(nav) { if (moved) { position = 1; } } public XPathSingletonIterator(XPathSingletonIterator it) { this.nav = it.nav.Clone(); this.position = it.position; } public override XPathNodeIterator Clone() { return new XPathSingletonIterator(this); } public override XPathNavigator Current { get { return nav; } } public override int CurrentPosition { get { return position; } } public override int Count { get { return 1; } } public override bool MoveNext() { if(position == 0) { position = 1; return true; } return false; } public override void Reset() { position = 0; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- HiddenField.cs
- Camera.cs
- DomNameTable.cs
- DbRetry.cs
- NameValueConfigurationElement.cs
- HitTestWithPointDrawingContextWalker.cs
- HttpStreams.cs
- Font.cs
- ExpandCollapseProviderWrapper.cs
- SplitContainer.cs
- Parameter.cs
- SqlInternalConnectionSmi.cs
- Style.cs
- InkCanvasSelectionAdorner.cs
- HtmlShimManager.cs
- SelectorItemAutomationPeer.cs
- NameTable.cs
- TdsParserStateObject.cs
- IxmlLineInfo.cs
- DataGridViewCellCancelEventArgs.cs
- SafeHandles.cs
- RankException.cs
- BindToObject.cs
- InternalsVisibleToAttribute.cs
- CfgParser.cs
- DataRowCollection.cs
- EmptyReadOnlyDictionaryInternal.cs
- FloaterBaseParagraph.cs
- GlobalizationAssembly.cs
- RawStylusInputReport.cs
- QilParameter.cs
- Rijndael.cs
- KnownBoxes.cs
- BufferedGraphics.cs
- X509ImageLogo.cs
- MailMessage.cs
- Point3D.cs
- VerticalAlignConverter.cs
- CommandLibraryHelper.cs
- ResourceContainerWrapper.cs
- ForEachDesigner.xaml.cs
- FormatterServices.cs
- ConfigurationValidatorAttribute.cs
- CompModHelpers.cs
- HtmlLink.cs
- Rect3D.cs
- WebSysDefaultValueAttribute.cs
- Viewport2DVisual3D.cs
- NodeLabelEditEvent.cs
- ObjectStateManager.cs
- CompiledQueryCacheEntry.cs
- AccessDataSource.cs
- TimeZone.cs
- WorkflowDurableInstance.cs
- LocatorManager.cs
- ProviderCommandInfoUtils.cs
- GB18030Encoding.cs
- TextParaLineResult.cs
- ContainerParaClient.cs
- PersonalizationAdministration.cs
- CommonObjectSecurity.cs
- ObjectFullSpanRewriter.cs
- HttpCacheVaryByContentEncodings.cs
- ZoneMembershipCondition.cs
- GridViewRowCollection.cs
- _WinHttpWebProxyDataBuilder.cs
- JsonCollectionDataContract.cs
- ToolStripPanelRow.cs
- BevelBitmapEffect.cs
- RotateTransform3D.cs
- FormsAuthenticationUserCollection.cs
- EditableTreeList.cs
- ChannelSinkStacks.cs
- ListenerElementsCollection.cs
- SrgsGrammarCompiler.cs
- CodeBlockBuilder.cs
- XmlIlVisitor.cs
- XsltConvert.cs
- Models.cs
- DBDataPermissionAttribute.cs
- WinFormsUtils.cs
- ContractDescription.cs
- MetaModel.cs
- CaseExpr.cs
- WebPartManagerInternals.cs
- MatrixAnimationBase.cs
- IpcPort.cs
- SqlStream.cs
- StreamInfo.cs
- QueryOutputWriter.cs
- EdmComplexTypeAttribute.cs
- ObjectStateManagerMetadata.cs
- ConnectionStringsSection.cs
- sqlstateclientmanager.cs
- AttributeProviderAttribute.cs
- PageAsyncTask.cs
- EntitySetRetriever.cs
- unsafenativemethodsother.cs
- ColorEditor.cs
- Literal.cs