Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / Xml / System / Xml / XPath / Internal / XPathSingletonIterator.cs / 2 / 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
- GlobalEventManager.cs
- UInt16Converter.cs
- AsyncDataRequest.cs
- NullableIntAverageAggregationOperator.cs
- ObjectPropertyMapping.cs
- RecordsAffectedEventArgs.cs
- ThreadStaticAttribute.cs
- RuleSettings.cs
- BaseHashHelper.cs
- EntitySet.cs
- WindowsTab.cs
- HashAlgorithm.cs
- OdbcConnectionStringbuilder.cs
- NavigatorOutput.cs
- _ListenerAsyncResult.cs
- HijriCalendar.cs
- SchemaNames.cs
- JobInputBins.cs
- FixedPage.cs
- EpmSyndicationContentSerializer.cs
- PrintControllerWithStatusDialog.cs
- AuthenticationModuleElement.cs
- CodeGotoStatement.cs
- IfJoinedCondition.cs
- ScriptServiceAttribute.cs
- RelationshipType.cs
- RepeatButton.cs
- ProxyFragment.cs
- SqlDataSourceCustomCommandEditor.cs
- ValidationSummary.cs
- SoapIncludeAttribute.cs
- WhileDesigner.cs
- HttpModulesSection.cs
- QilSortKey.cs
- PresentationTraceSources.cs
- ProjectionCamera.cs
- Version.cs
- PageVisual.cs
- RadioButtonList.cs
- SafeLocalMemHandle.cs
- XmlNodeWriter.cs
- Component.cs
- XhtmlBasicCalendarAdapter.cs
- mediaclock.cs
- BezierSegment.cs
- CodeNamespace.cs
- SetStateDesigner.cs
- GroupBox.cs
- TraceInternal.cs
- DocumentViewerConstants.cs
- HttpProfileGroupBase.cs
- ExceptionAggregator.cs
- RankException.cs
- ApplicationId.cs
- BitStack.cs
- ObjectQueryState.cs
- WebResourceAttribute.cs
- MediaSystem.cs
- CodeAccessSecurityEngine.cs
- Config.cs
- ZipIOExtraFieldElement.cs
- XmlSchemaExporter.cs
- validationstate.cs
- SqlStatistics.cs
- GeneratedCodeAttribute.cs
- GridViewUpdatedEventArgs.cs
- TemplateBindingExpression.cs
- BasicExpandProvider.cs
- WebBrowserHelper.cs
- Line.cs
- BinaryMethodMessage.cs
- AgileSafeNativeMemoryHandle.cs
- XmlExpressionDumper.cs
- SymmetricCryptoHandle.cs
- QueryCacheKey.cs
- RowSpanVector.cs
- RegexCompiler.cs
- InstanceOwnerException.cs
- AutomationEvent.cs
- BindingBase.cs
- WindowsSolidBrush.cs
- ContentTypeSettingClientMessageFormatter.cs
- GenericTextProperties.cs
- TreeNodeEventArgs.cs
- ContentDisposition.cs
- TabControlCancelEvent.cs
- EventManager.cs
- PropertyEmitterBase.cs
- EpmTargetTree.cs
- ContentOperations.cs
- Cursors.cs
- DesignBindingPropertyDescriptor.cs
- XmlProcessingInstruction.cs
- BamlRecordHelper.cs
- TextRunProperties.cs
- StrongNameMembershipCondition.cs
- WorkflowViewElement.cs
- NamedPipeTransportElement.cs
- LoginCancelEventArgs.cs
- GridViewRow.cs