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
- ApplicationSecurityInfo.cs
- ResourceReferenceKeyNotFoundException.cs
- TypedElement.cs
- StructureChangedEventArgs.cs
- DependencyProperty.cs
- OracleCommand.cs
- compensatingcollection.cs
- TimeIntervalCollection.cs
- UnsafeNativeMethodsCLR.cs
- MergeFilterQuery.cs
- EventLogStatus.cs
- EpmSyndicationContentDeSerializer.cs
- ColumnHeaderConverter.cs
- ConnectionPoint.cs
- XmlResolver.cs
- OleCmdHelper.cs
- PropertyCollection.cs
- SplayTreeNode.cs
- FlowDocumentScrollViewer.cs
- ArrayTypeMismatchException.cs
- CounterCreationDataCollection.cs
- PermissionAttributes.cs
- COM2PropertyDescriptor.cs
- HttpValueCollection.cs
- DataGridColumnFloatingHeader.cs
- SQLMembershipProvider.cs
- ResXResourceSet.cs
- SourceInterpreter.cs
- HwndSubclass.cs
- InputLanguageEventArgs.cs
- DSASignatureFormatter.cs
- Subtree.cs
- DataBindingExpressionBuilder.cs
- ToolStripPanelSelectionBehavior.cs
- XamlBrushSerializer.cs
- TemplatedMailWebEventProvider.cs
- WebPart.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ListChangedEventArgs.cs
- XslTransform.cs
- GridEntryCollection.cs
- List.cs
- SettingsProviderCollection.cs
- XmlSchemaRedefine.cs
- XPathNode.cs
- SystemGatewayIPAddressInformation.cs
- BitmapFrameEncode.cs
- FileCodeGroup.cs
- CollectionChangedEventManager.cs
- HtmlElement.cs
- IIS7UserPrincipal.cs
- RoleGroupCollection.cs
- TextEditorLists.cs
- TextBoxRenderer.cs
- CompositeDispatchFormatter.cs
- PrivilegeNotHeldException.cs
- TypedReference.cs
- MailMessage.cs
- TemplatePartAttribute.cs
- ExplicitDiscriminatorMap.cs
- ErrorHandler.cs
- EntityDataSourceChangingEventArgs.cs
- SelectionRange.cs
- ListBoxAutomationPeer.cs
- NavigationProgressEventArgs.cs
- DashStyle.cs
- ColorConvertedBitmapExtension.cs
- HitTestResult.cs
- XPathConvert.cs
- WebPartZone.cs
- ScrollPattern.cs
- MarkupObject.cs
- Subtree.cs
- StylusPointProperty.cs
- BitmapSourceSafeMILHandle.cs
- DataBindEngine.cs
- ServicePointManagerElement.cs
- ReadOnlyHierarchicalDataSourceView.cs
- Array.cs
- Zone.cs
- XmlValueConverter.cs
- BamlRecordWriter.cs
- RequestCacheManager.cs
- NativeMethods.cs
- securitycriticaldataformultiplegetandset.cs
- base64Transforms.cs
- XpsManager.cs
- IgnoreSectionHandler.cs
- TypeToTreeConverter.cs
- WebZone.cs
- DbDataReader.cs
- TemplateKeyConverter.cs
- SerializationEventsCache.cs
- HwndHost.cs
- InstanceStoreQueryResult.cs
- OdbcFactory.cs
- DataDocumentXPathNavigator.cs
- KoreanCalendar.cs
- BrowsableAttribute.cs
- EncoderNLS.cs