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
- RpcCryptoContext.cs
- CustomAttributeFormatException.cs
- BooleanSwitch.cs
- EventMappingSettingsCollection.cs
- SortDescriptionCollection.cs
- BuildResult.cs
- LinqExpressionNormalizer.cs
- TextEditorLists.cs
- SqlResolver.cs
- LineInfo.cs
- EntityDataSourceContainerNameItem.cs
- Popup.cs
- AnchorEditor.cs
- Page.cs
- DataServiceClientException.cs
- COAUTHINFO.cs
- DocumentViewerAutomationPeer.cs
- SafeFileMappingHandle.cs
- UIPermission.cs
- CodeDefaultValueExpression.cs
- ItemContainerGenerator.cs
- ParameterDataSourceExpression.cs
- XmlLoader.cs
- ProfileManager.cs
- MbpInfo.cs
- ToolStripPanelSelectionGlyph.cs
- DependencyPropertyKind.cs
- DataGridViewAdvancedBorderStyle.cs
- GeneratedContractType.cs
- MemberRelationshipService.cs
- ContainerAction.cs
- DiscriminatorMap.cs
- MessageBox.cs
- LoadedOrUnloadedOperation.cs
- InvalidProgramException.cs
- CheckBoxList.cs
- SiteMapDataSource.cs
- DataGridViewTextBoxCell.cs
- ChameleonKey.cs
- DataGridCaption.cs
- Style.cs
- DependencyPropertyKey.cs
- WindowsGraphics2.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- Menu.cs
- ProgressBarRenderer.cs
- ProfileManager.cs
- AmbientLight.cs
- CopyNamespacesAction.cs
- UInt32Storage.cs
- AppSettingsExpressionBuilder.cs
- PageCatalogPartDesigner.cs
- CommandEventArgs.cs
- ImagingCache.cs
- Win32SafeHandles.cs
- GridPattern.cs
- Debug.cs
- RequestCachePolicy.cs
- DefaultExpression.cs
- UIElementPropertyUndoUnit.cs
- MimeTypePropertyAttribute.cs
- Pair.cs
- SpellerHighlightLayer.cs
- NavigationCommands.cs
- DataGridItemCollection.cs
- StrongNameUtility.cs
- DataSourceControlBuilder.cs
- AspNetHostingPermission.cs
- LongValidator.cs
- TypeGeneratedEventArgs.cs
- EncryptedData.cs
- CustomErrorCollection.cs
- BindingExpressionBase.cs
- DrawingState.cs
- DataGridViewTopLeftHeaderCell.cs
- EdmSchemaAttribute.cs
- DeploymentExceptionMapper.cs
- BrowserInteropHelper.cs
- Rules.cs
- EntityKeyElement.cs
- UInt32Storage.cs
- QilLiteral.cs
- SystemTcpStatistics.cs
- TaiwanCalendar.cs
- _SslSessionsCache.cs
- JumpItem.cs
- StructuredTypeEmitter.cs
- BamlWriter.cs
- WebPartEditorCancelVerb.cs
- RunInstallerAttribute.cs
- UrlPropertyAttribute.cs
- SimpleParser.cs
- InvokeMethodActivityDesigner.cs
- RequiredAttributeAttribute.cs
- SchemaNamespaceManager.cs
- odbcmetadatacollectionnames.cs
- Border.cs
- HtmlWindow.cs
- XPathAncestorQuery.cs
- smtppermission.cs