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 / XPath / Internal / IteratorFilter.cs / 1 / IteratorFilter.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 IteratorFilter : XPathNodeIterator { private XPathNodeIterator innerIterator; private string name; private int position = 0; internal IteratorFilter(XPathNodeIterator innerIterator, string name) { this.innerIterator = innerIterator; this.name = name; } private IteratorFilter(IteratorFilter it) { this.innerIterator = it.innerIterator.Clone(); this.name = it.name; this.position = it.position; } public override XPathNodeIterator Clone() { return new IteratorFilter(this); } public override XPathNavigator Current { get { return innerIterator.Current;} } public override int CurrentPosition { get { return this.position; } } public override bool MoveNext() { while(innerIterator.MoveNext()) { if(innerIterator.Current.LocalName == this.name) { this.position ++; return true; } } return false; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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 IteratorFilter : XPathNodeIterator { private XPathNodeIterator innerIterator; private string name; private int position = 0; internal IteratorFilter(XPathNodeIterator innerIterator, string name) { this.innerIterator = innerIterator; this.name = name; } private IteratorFilter(IteratorFilter it) { this.innerIterator = it.innerIterator.Clone(); this.name = it.name; this.position = it.position; } public override XPathNodeIterator Clone() { return new IteratorFilter(this); } public override XPathNavigator Current { get { return innerIterator.Current;} } public override int CurrentPosition { get { return this.position; } } public override bool MoveNext() { while(innerIterator.MoveNext()) { if(innerIterator.Current.LocalName == this.name) { this.position ++; return true; } } return false; } } } // 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
- Pair.cs
- ObjectPersistData.cs
- XmlSchemaSimpleType.cs
- ObjectStorage.cs
- AttachmentService.cs
- _StreamFramer.cs
- XmlSerializerAssemblyAttribute.cs
- TextRange.cs
- QueuePathDialog.cs
- ClientBuildManager.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- RadioButtonList.cs
- CodeAttributeDeclarationCollection.cs
- RequestQueue.cs
- PassportAuthentication.cs
- TableSectionStyle.cs
- TrackingProfile.cs
- LocalFileSettingsProvider.cs
- PassportIdentity.cs
- EndpointConfigContainer.cs
- Point3DCollectionConverter.cs
- GreenMethods.cs
- Fonts.cs
- RangeValueProviderWrapper.cs
- DataObjectFieldAttribute.cs
- ServiceHttpHandlerFactory.cs
- DrawingAttributeSerializer.cs
- TypedReference.cs
- ACL.cs
- SqlDataSourceTableQuery.cs
- IWorkflowDebuggerService.cs
- Floater.cs
- LoginUtil.cs
- EventHandlers.cs
- XsltOutput.cs
- Encoding.cs
- DataIdProcessor.cs
- AuthenticationService.cs
- MiniLockedBorderGlyph.cs
- OleDbWrapper.cs
- StreamGeometry.cs
- ToolStripOverflow.cs
- EndSelectCardRequest.cs
- XsdDataContractExporter.cs
- ReadOnlyCollectionBase.cs
- PerformanceCounterPermission.cs
- ManagementInstaller.cs
- CollectionConverter.cs
- PostBackOptions.cs
- RunClient.cs
- QualificationDataItem.cs
- ConfigurationValue.cs
- SelectionItemProviderWrapper.cs
- KeyInterop.cs
- SafeEventLogWriteHandle.cs
- DependencyObjectProvider.cs
- GcHandle.cs
- DBConnection.cs
- DataGridViewTextBoxColumn.cs
- ProviderCommandInfoUtils.cs
- ServiceReference.cs
- PTConverter.cs
- MetadataArtifactLoader.cs
- AspProxy.cs
- NameValueFileSectionHandler.cs
- NumberSubstitution.cs
- X509Utils.cs
- QueryException.cs
- MetadataItemCollectionFactory.cs
- JsonFormatWriterGenerator.cs
- Range.cs
- _HTTPDateParse.cs
- Attribute.cs
- LoginUtil.cs
- CompiledAction.cs
- HtmlInputSubmit.cs
- CodeMemberProperty.cs
- CompilerState.cs
- SocketAddress.cs
- ToolStripProgressBar.cs
- CodeAttributeArgument.cs
- Helper.cs
- FormClosingEvent.cs
- ScrollItemProviderWrapper.cs
- StrokeCollection2.cs
- ProjectionAnalyzer.cs
- AuthenticationService.cs
- EnumerableRowCollectionExtensions.cs
- FileLogRecordHeader.cs
- IgnoreFileBuildProvider.cs
- RadialGradientBrush.cs
- tibetanshape.cs
- DurableInstanceProvider.cs
- SizeAnimationBase.cs
- UnauthorizedAccessException.cs
- SQLChars.cs
- ListManagerBindingsCollection.cs
- LayoutEngine.cs
- LoginAutoFormat.cs
- Delay.cs