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
- NetTcpBinding.cs
- SqlException.cs
- OptimizerPatterns.cs
- ExtensionsSection.cs
- PrintPageEvent.cs
- WindowsSolidBrush.cs
- DiagnosticsConfiguration.cs
- SynchronizingStream.cs
- MergeLocalizationDirectives.cs
- InputBuffer.cs
- Storyboard.cs
- Axis.cs
- XhtmlBasicObjectListAdapter.cs
- WebContext.cs
- Parser.cs
- HttpServerVarsCollection.cs
- LateBoundBitmapDecoder.cs
- StickyNoteHelper.cs
- SizeValueSerializer.cs
- ConfigPathUtility.cs
- BinaryNode.cs
- RemoteWebConfigurationHostServer.cs
- MatrixConverter.cs
- RootNamespaceAttribute.cs
- PolyBezierSegment.cs
- ListDictionary.cs
- Misc.cs
- WorkerRequest.cs
- ContextCorrelationInitializer.cs
- WindowsPrincipal.cs
- FilterableAttribute.cs
- TextEditor.cs
- DispatcherFrame.cs
- SmtpReplyReader.cs
- MarshalDirectiveException.cs
- GACMembershipCondition.cs
- CompatibleIComparer.cs
- XPathParser.cs
- odbcmetadatacolumnnames.cs
- SiteMapHierarchicalDataSourceView.cs
- TrackingQuery.cs
- ControlOperationBehavior.cs
- Cursor.cs
- CustomBinding.cs
- ExchangeUtilities.cs
- TablePatternIdentifiers.cs
- InternalCache.cs
- BinaryWriter.cs
- BlurEffect.cs
- KnownTypeHelper.cs
- RichTextBoxDesigner.cs
- ClientSideProviderDescription.cs
- MailMessage.cs
- TypeForwardedToAttribute.cs
- FullTextBreakpoint.cs
- SignedInfo.cs
- RuntimeHelpers.cs
- BinHexEncoder.cs
- BitmapInitialize.cs
- SizeFConverter.cs
- Vector3DIndependentAnimationStorage.cs
- TypeConverterAttribute.cs
- WmlPageAdapter.cs
- DataGrid.cs
- ToolStripDropDownMenu.cs
- SignatureResourcePool.cs
- DataGridViewTextBoxEditingControl.cs
- GridViewDeleteEventArgs.cs
- ObjectDataSourceMethodEventArgs.cs
- HtmlSelectionListAdapter.cs
- DataComponentMethodGenerator.cs
- StyleBamlTreeBuilder.cs
- SQLCharsStorage.cs
- AdapterUtil.cs
- StringValidatorAttribute.cs
- DateTimeParse.cs
- ArgumentDirectionHelper.cs
- HtmlHead.cs
- InvokePattern.cs
- GridViewRowPresenterBase.cs
- XmlSchemaGroup.cs
- AnonymousIdentificationSection.cs
- GenericFlowSwitchHelper.cs
- UrlAuthFailedErrorFormatter.cs
- DataGridViewRowCancelEventArgs.cs
- Point3DCollection.cs
- ClientTargetCollection.cs
- RawAppCommandInputReport.cs
- UpdateProgress.cs
- LineVisual.cs
- StringDictionary.cs
- DesignerImageAdapter.cs
- ExternalFile.cs
- OdbcReferenceCollection.cs
- InvalidCastException.cs
- PropagatorResult.cs
- SelectionHighlightInfo.cs
- HeaderUtility.cs
- ImmutableObjectAttribute.cs
- LambdaCompiler.cs