Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SQLMembershipProvider.cs
- PointUtil.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DispatchChannelSink.cs
- GiveFeedbackEventArgs.cs
- DataGridViewComboBoxCell.cs
- __Error.cs
- Help.cs
- CellQuery.cs
- WriterOutput.cs
- documentation.cs
- SendMessageRecord.cs
- Certificate.cs
- ToolboxItemFilterAttribute.cs
- TextContainerChangeEventArgs.cs
- DataStreams.cs
- TextClipboardData.cs
- FormClosingEvent.cs
- XPathParser.cs
- ActivityDesignerHelper.cs
- DirectoryInfo.cs
- FileStream.cs
- RelationshipFixer.cs
- Tuple.cs
- DataSourceHelper.cs
- MarkupExtensionParser.cs
- ControlBuilderAttribute.cs
- CfgArc.cs
- TemplateBamlRecordReader.cs
- CodeSnippetStatement.cs
- BaseCollection.cs
- PersonalizablePropertyEntry.cs
- TreeViewItem.cs
- SmtpReplyReaderFactory.cs
- Adorner.cs
- UTF7Encoding.cs
- ADConnectionHelper.cs
- DefaultBinder.cs
- WebPartHelpVerb.cs
- HexParser.cs
- Perspective.cs
- MediaScriptCommandRoutedEventArgs.cs
- GenerateTemporaryTargetAssembly.cs
- StylusPointPropertyUnit.cs
- IndexerNameAttribute.cs
- PropertyDescriptorGridEntry.cs
- DataList.cs
- DbMetaDataColumnNames.cs
- ForeignKeyConstraint.cs
- SecurityHeaderElementInferenceEngine.cs
- TemplateControlCodeDomTreeGenerator.cs
- NativeMethods.cs
- AddInAttribute.cs
- MaskedTextBoxTextEditor.cs
- ItemType.cs
- CaseInsensitiveHashCodeProvider.cs
- HideDisabledControlAdapter.cs
- DesignRelation.cs
- XmlConvert.cs
- NavigationProperty.cs
- CrossContextChannel.cs
- MetadataCollection.cs
- Condition.cs
- GrammarBuilderDictation.cs
- DataListItemEventArgs.cs
- SystemIPv4InterfaceProperties.cs
- AxisAngleRotation3D.cs
- TextBlockAutomationPeer.cs
- HtmlTableRowCollection.cs
- ConditionedDesigner.cs
- VBIdentifierTrimConverter.cs
- EventRouteFactory.cs
- CodeDirectionExpression.cs
- CustomAttributeSerializer.cs
- SmiEventSink_Default.cs
- ArrayWithOffset.cs
- SystemInfo.cs
- followingsibling.cs
- PlacementWorkspace.cs
- UnionExpr.cs
- ProofTokenCryptoHandle.cs
- DetailsViewUpdatedEventArgs.cs
- MarkupCompilePass2.cs
- ByteRangeDownloader.cs
- SqlBooleanizer.cs
- Int32RectConverter.cs
- AgileSafeNativeMemoryHandle.cs
- ResourceSet.cs
- PopupControlService.cs
- DataServiceQueryException.cs
- RecommendedAsConfigurableAttribute.cs
- ListParagraph.cs
- StronglyTypedResourceBuilder.cs
- TableMethodGenerator.cs
- FormViewInsertEventArgs.cs
- WebEncodingValidator.cs
- TTSEngineTypes.cs
- DbExpressionVisitor.cs
- SocketManager.cs
- AuthStoreRoleProvider.cs