Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / Util / DoubleLinkListEnumerator.cs / 1 / DoubleLinkListEnumerator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * DoubleLinkList * * Copyright (c) 1998-1999, Microsoft Corporation * */ namespace System.Web.Util { using System.Runtime.Serialization.Formatters; using System.Collections; internal class DoubleLinkListEnumerator : IEnumerator { private DoubleLinkList _list; private DoubleLink _current; internal DoubleLinkListEnumerator(DoubleLinkList list) { _list = list; _current = list; } public void Reset() { _current = _list; } public bool MoveNext() { if (_current.Next == _list) { _current = null; return false; } _current = _current.Next; return true; } public Object Current { get { if (_current == null || _current == _list) throw new InvalidOperationException(); return _current.Item; } } internal DoubleLink GetDoubleLink() { return _current; } #if UNUSED_CODE internal void Remove() { if (_current == null || _current == _list) throw new InvalidOperationException(); DoubleLink t = _current; _current = _current.Prev; t.Remove(); } #endif } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* * DoubleLinkList * * Copyright (c) 1998-1999, Microsoft Corporation * */ namespace System.Web.Util { using System.Runtime.Serialization.Formatters; using System.Collections; internal class DoubleLinkListEnumerator : IEnumerator { private DoubleLinkList _list; private DoubleLink _current; internal DoubleLinkListEnumerator(DoubleLinkList list) { _list = list; _current = list; } public void Reset() { _current = _list; } public bool MoveNext() { if (_current.Next == _list) { _current = null; return false; } _current = _current.Next; return true; } public Object Current { get { if (_current == null || _current == _list) throw new InvalidOperationException(); return _current.Item; } } internal DoubleLink GetDoubleLink() { return _current; } #if UNUSED_CODE internal void Remove() { if (_current == null || _current == _list) throw new InvalidOperationException(); DoubleLink t = _current; _current = _current.Prev; t.Remove(); } #endif } } // 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
- DataTransferEventArgs.cs
- BufferedWebEventProvider.cs
- Frame.cs
- ReadOnlyDictionary.cs
- SQLGuid.cs
- SelectionItemProviderWrapper.cs
- EntityDataSourceChangedEventArgs.cs
- FastPropertyAccessor.cs
- XmlBufferedByteStreamReader.cs
- ComponentTray.cs
- Utility.cs
- SQLString.cs
- AnnotationDocumentPaginator.cs
- HostUtils.cs
- XmlSchemaDatatype.cs
- TcpTransportBindingElement.cs
- ChildrenQuery.cs
- InstanceCreationEditor.cs
- ButtonField.cs
- ClientSettingsSection.cs
- UnsafeNativeMethods.cs
- DefaultBinder.cs
- DataGridViewCellFormattingEventArgs.cs
- ContentIterators.cs
- Rect.cs
- DesignerUtility.cs
- PKCS1MaskGenerationMethod.cs
- MemberAccessException.cs
- Certificate.cs
- ToolStripDropDownClosedEventArgs.cs
- MatchingStyle.cs
- ObjectCloneHelper.cs
- Assert.cs
- SQLMembershipProvider.cs
- XmlWriter.cs
- ExtractedStateEntry.cs
- AssemblyResolver.cs
- ISAPIRuntime.cs
- ColumnMapCopier.cs
- ping.cs
- SqlServices.cs
- CompositeFontParser.cs
- SiteMapDesignerDataSourceView.cs
- Logging.cs
- PasswordPropertyTextAttribute.cs
- HashHelper.cs
- NamespaceInfo.cs
- OpenFileDialog.cs
- SmtpSection.cs
- FixedFindEngine.cs
- SchemaNotation.cs
- CharUnicodeInfo.cs
- AttachedPropertyInfo.cs
- ColorConverter.cs
- SkewTransform.cs
- SQLByteStorage.cs
- BinaryObjectWriter.cs
- ObjectPropertyMapping.cs
- UrlMapping.cs
- DefaultSettingsSection.cs
- OleDbErrorCollection.cs
- TypeNameConverter.cs
- RectAnimationBase.cs
- SponsorHelper.cs
- ReadOnlyObservableCollection.cs
- UnauthorizedAccessException.cs
- FillErrorEventArgs.cs
- Polygon.cs
- ButtonRenderer.cs
- SoapTypeAttribute.cs
- RtType.cs
- CookielessHelper.cs
- MimeAnyImporter.cs
- ReadOnlyNameValueCollection.cs
- EntityKeyElement.cs
- MultiBindingExpression.cs
- HideDisabledControlAdapter.cs
- GlyphCache.cs
- GlyphRunDrawing.cs
- Route.cs
- SemaphoreFullException.cs
- PropertyCollection.cs
- EmptyStringExpandableObjectConverter.cs
- EntityEntry.cs
- TemplateField.cs
- PagerSettings.cs
- MsmqAuthenticationMode.cs
- XhtmlBasicObjectListAdapter.cs
- GroupJoinQueryOperator.cs
- DataBindEngine.cs
- SystemIPInterfaceProperties.cs
- AppDomainProtocolHandler.cs
- CatalogUtil.cs
- PersonalizationAdministration.cs
- LocalBuilder.cs
- Decorator.cs
- ParagraphVisual.cs
- WindowsGrip.cs
- ServiceDeploymentInfo.cs
- PrintPreviewDialog.cs