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
- TextBoxBaseDesigner.cs
- XmlHierarchicalEnumerable.cs
- EntityStoreSchemaFilterEntry.cs
- __Filters.cs
- XPSSignatureDefinition.cs
- NumericUpDownAcceleration.cs
- ProcessThreadCollection.cs
- ActiveXSite.cs
- PagesSection.cs
- SchemaAttDef.cs
- DifferencingCollection.cs
- SubpageParagraph.cs
- ManagedWndProcTracker.cs
- WinFormsUtils.cs
- MobileCategoryAttribute.cs
- XamlWriter.cs
- PersonalizableAttribute.cs
- FlagPanel.cs
- Drawing.cs
- Point.cs
- PropertyPath.cs
- Context.cs
- FlowLayout.cs
- DiscoveryMessageSequence11.cs
- SHA384CryptoServiceProvider.cs
- ViewSimplifier.cs
- DelegateArgumentReference.cs
- RenderDataDrawingContext.cs
- Point3DCollection.cs
- MetafileHeader.cs
- GPRECTF.cs
- TableCell.cs
- NativeMethods.cs
- AspCompat.cs
- SeekableReadStream.cs
- CodeCatchClause.cs
- Error.cs
- DispatcherOperation.cs
- HtmlString.cs
- SiteMap.cs
- XamlHostingSectionGroup.cs
- QueryOptionExpression.cs
- LogicalExpr.cs
- SymmetricKeyWrap.cs
- CommittableTransaction.cs
- XmlUtf8RawTextWriter.cs
- MappingItemCollection.cs
- WindowsPen.cs
- WindowsContainer.cs
- Scheduling.cs
- _ChunkParse.cs
- QueryGenerator.cs
- CustomAttributeFormatException.cs
- LayoutExceptionEventArgs.cs
- ModelVisual3D.cs
- IssuedSecurityTokenParameters.cs
- CodeEntryPointMethod.cs
- MonitoringDescriptionAttribute.cs
- ItemCheckedEvent.cs
- HostedTcpTransportManager.cs
- XNodeSchemaApplier.cs
- Activator.cs
- ToolBarButton.cs
- RoutingExtensionElement.cs
- NominalTypeEliminator.cs
- ContentPresenter.cs
- EdmFunction.cs
- X509SecurityTokenAuthenticator.cs
- BamlCollectionHolder.cs
- InputQueue.cs
- ComplexObject.cs
- WindowClosedEventArgs.cs
- AddInBase.cs
- ListViewEditEventArgs.cs
- XmlSchemaSimpleTypeUnion.cs
- PolicyUnit.cs
- ConsoleTraceListener.cs
- BamlLocalizationDictionary.cs
- RayMeshGeometry3DHitTestResult.cs
- ClientBuildManagerCallback.cs
- loginstatus.cs
- ObjectDataSourceMethodEditor.cs
- XmlTextReaderImpl.cs
- StorageEntityTypeMapping.cs
- SchemaObjectWriter.cs
- FormParameter.cs
- ProfileProvider.cs
- SqlExpander.cs
- BaseHashHelper.cs
- LinkUtilities.cs
- WorkItem.cs
- SplitterCancelEvent.cs
- XmlNamespaceManager.cs
- FixedSOMTableCell.cs
- DependencyObjectValidator.cs
- WebUtil.cs
- LinqExpressionNormalizer.cs
- ContextMenuStrip.cs
- FigureParagraph.cs
- WindowsListViewGroupSubsetLink.cs