Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- HtmlTableCell.cs
- WebPartDisplayModeCancelEventArgs.cs
- EUCJPEncoding.cs
- MailMessageEventArgs.cs
- EdmItemError.cs
- cache.cs
- PerformanceCounterPermissionAttribute.cs
- CaseStatement.cs
- DbgUtil.cs
- ActivityInstance.cs
- DispatchChannelSink.cs
- CodePageUtils.cs
- precedingsibling.cs
- AddInAttribute.cs
- DbDataSourceEnumerator.cs
- CompilationSection.cs
- DeleteCardRequest.cs
- MessageSecurityOverMsmqElement.cs
- CodeTypeReferenceExpression.cs
- MouseGestureValueSerializer.cs
- EntityFunctions.cs
- SpecularMaterial.cs
- XmlSchemaSimpleTypeList.cs
- XmlSerializer.cs
- ReflectPropertyDescriptor.cs
- DbConnectionPoolCounters.cs
- MatrixValueSerializer.cs
- StrongNameKeyPair.cs
- Int32KeyFrameCollection.cs
- WorkItem.cs
- Delegate.cs
- Function.cs
- WorkflowInstance.cs
- XmlTextAttribute.cs
- StrokeNode.cs
- BuildManager.cs
- InternalsVisibleToAttribute.cs
- FixedTextContainer.cs
- RootBrowserWindowAutomationPeer.cs
- IDQuery.cs
- RegexCompiler.cs
- ValueChangedEventManager.cs
- SoapServerProtocol.cs
- ProcessRequestArgs.cs
- TouchEventArgs.cs
- StatusStrip.cs
- TransformedBitmap.cs
- ConstructorArgumentAttribute.cs
- CodeSubDirectoriesCollection.cs
- Decoder.cs
- EnumMember.cs
- CodeTypeDeclaration.cs
- MatrixTransform3D.cs
- VirtualizingStackPanel.cs
- DataGridViewHitTestInfo.cs
- DropShadowBitmapEffect.cs
- ConfigXmlWhitespace.cs
- DefaultParameterValueAttribute.cs
- MultiBindingExpression.cs
- _CacheStreams.cs
- nulltextcontainer.cs
- DataDocumentXPathNavigator.cs
- VisualStyleRenderer.cs
- ScrollContentPresenter.cs
- UIElement.cs
- TemplateControl.cs
- DeploymentExceptionMapper.cs
- SemanticTag.cs
- FormCollection.cs
- AppDomainAttributes.cs
- FontSource.cs
- ViewLoader.cs
- GorillaCodec.cs
- AssemblyBuilderData.cs
- JpegBitmapEncoder.cs
- BaseCodeDomTreeGenerator.cs
- _ContextAwareResult.cs
- RoutedEventConverter.cs
- ResourceIDHelper.cs
- SystemPens.cs
- WindowsFormsSectionHandler.cs
- ListViewHitTestInfo.cs
- AppDomainAttributes.cs
- SqlDataSourceEnumerator.cs
- CriticalHandle.cs
- MarshalByValueComponent.cs
- IPEndPoint.cs
- SqlTypeConverter.cs
- MouseOverProperty.cs
- AuthenticateEventArgs.cs
- XhtmlCssHandler.cs
- EntityClientCacheEntry.cs
- EmptyStringExpandableObjectConverter.cs
- ContractAdapter.cs
- EntityDesignerDataSourceView.cs
- PeerResolverSettings.cs
- ActivityBindForm.cs
- SoapCommonClasses.cs
- EmptyControlCollection.cs
- SortQuery.cs