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 / ResetableIterator.cs / 1 / ResetableIterator.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 abstract class ResetableIterator : XPathNodeIterator { // the best place for this constructors to be is XPathNodeIterator, to avoid DCR at this time let's ground them here public ResetableIterator() { base.count = -1; } protected ResetableIterator(ResetableIterator other) { base.count = other.count; } protected void ResetCount() { base.count = -1; } public abstract void Reset(); public virtual bool MoveToPosition(int pos) { Reset(); for(int i = CurrentPosition; i < pos ; i ++) { if(!MoveNext()) { return false; } } return true; } // Contruct extension: CurrentPosition should return 0 if MoveNext() wasn't called after Reset() // (behavior is not defined for XPathNodeIterator) public abstract override int CurrentPosition { get; } } } // 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 abstract class ResetableIterator : XPathNodeIterator { // the best place for this constructors to be is XPathNodeIterator, to avoid DCR at this time let's ground them here public ResetableIterator() { base.count = -1; } protected ResetableIterator(ResetableIterator other) { base.count = other.count; } protected void ResetCount() { base.count = -1; } public abstract void Reset(); public virtual bool MoveToPosition(int pos) { Reset(); for(int i = CurrentPosition; i < pos ; i ++) { if(!MoveNext()) { return false; } } return true; } // Contruct extension: CurrentPosition should return 0 if MoveNext() wasn't called after Reset() // (behavior is not defined for XPathNodeIterator) public abstract override int CurrentPosition { get; } } } // 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
- DataTableMapping.cs
- ProvidersHelper.cs
- Slider.cs
- RegexRunnerFactory.cs
- SchemaLookupTable.cs
- _NegoStream.cs
- ApplicationActivator.cs
- SystemTcpStatistics.cs
- BindingGroup.cs
- UnsafePeerToPeerMethods.cs
- DataGridViewSortCompareEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- AssemblyNameProxy.cs
- ServiceModelEnumValidator.cs
- CodeDirectoryCompiler.cs
- ColumnWidthChangedEvent.cs
- DocumentPageTextView.cs
- FontSource.cs
- Utils.cs
- CompoundFileStorageReference.cs
- StdValidatorsAndConverters.cs
- CollectionChangedEventManager.cs
- HtmlEmptyTagControlBuilder.cs
- WSHttpSecurity.cs
- ListControl.cs
- DBDataPermissionAttribute.cs
- CompressStream.cs
- CheckBoxBaseAdapter.cs
- SizeValueSerializer.cs
- SqlSupersetValidator.cs
- ImplicitInputBrush.cs
- ObjectQuery_EntitySqlExtensions.cs
- Substitution.cs
- CatalogPart.cs
- HtmlWindow.cs
- PermissionSetTriple.cs
- WebServiceParameterData.cs
- ToolboxControl.cs
- Byte.cs
- PointLightBase.cs
- GlyphElement.cs
- FollowerQueueCreator.cs
- SpellerInterop.cs
- ChineseLunisolarCalendar.cs
- ChtmlPageAdapter.cs
- PresentationSource.cs
- XmlElementList.cs
- filewebrequest.cs
- InputBinder.cs
- Task.cs
- RuntimeEnvironment.cs
- DataSetUtil.cs
- HTMLTagNameToTypeMapper.cs
- RegexParser.cs
- MenuBase.cs
- DataGridTextBoxColumn.cs
- BitmapSourceSafeMILHandle.cs
- HttpEncoder.cs
- EditorPartChrome.cs
- _FtpDataStream.cs
- Util.cs
- ProxyWebPartManager.cs
- StrokeIntersection.cs
- GradientBrush.cs
- ErrorCodes.cs
- Rect.cs
- DodSequenceMerge.cs
- AdRotatorDesigner.cs
- StorageInfo.cs
- XamlDesignerSerializationManager.cs
- EntityParameter.cs
- ProtocolsConfigurationEntry.cs
- SmtpDigestAuthenticationModule.cs
- MarshalByRefObject.cs
- ProtocolsConfigurationEntry.cs
- DataServiceQuery.cs
- OleDragDropHandler.cs
- NumericUpDownAccelerationCollection.cs
- EventSetter.cs
- mil_commands.cs
- DesignerVerb.cs
- VoiceSynthesis.cs
- WebOperationContext.cs
- ReflectionTypeLoadException.cs
- SQLStringStorage.cs
- Point3DAnimationBase.cs
- WebServiceEnumData.cs
- WebPartManager.cs
- SiteMap.cs
- SharedStatics.cs
- OracleConnectionStringBuilder.cs
- OptimizerPatterns.cs
- ThicknessAnimationUsingKeyFrames.cs
- IteratorFilter.cs
- WebPartEditVerb.cs
- ProfileGroupSettingsCollection.cs
- TemplatedMailWebEventProvider.cs
- DllHostedComPlusServiceHost.cs
- WindowVisualStateTracker.cs
- URL.cs