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
- Geometry3D.cs
- StorageMappingItemLoader.cs
- OpenTypeLayoutCache.cs
- GlobalizationSection.cs
- EntityCommandCompilationException.cs
- OAVariantLib.cs
- Security.cs
- SoapInteropTypes.cs
- AuthenticationException.cs
- RelativeSource.cs
- TableRowCollection.cs
- Point3DCollection.cs
- Compiler.cs
- GridViewHeaderRowPresenter.cs
- TypeToArgumentTypeConverter.cs
- WithStatement.cs
- AutomationTextAttribute.cs
- InvalidEnumArgumentException.cs
- FileRecordSequence.cs
- SessionStateContainer.cs
- WindowsMenu.cs
- MasterPageCodeDomTreeGenerator.cs
- WebPartConnectionsCloseVerb.cs
- SystemIPv4InterfaceProperties.cs
- DetailsViewRow.cs
- ContextProperty.cs
- WebHttpDispatchOperationSelector.cs
- GridView.cs
- PasswordPropertyTextAttribute.cs
- WSSecurityPolicy.cs
- CacheDependency.cs
- BulletChrome.cs
- EncoderParameter.cs
- VScrollProperties.cs
- StylusOverProperty.cs
- HtmlControl.cs
- ResourceIDHelper.cs
- SelectionItemProviderWrapper.cs
- CLSCompliantAttribute.cs
- PagedControl.cs
- MultiSelectRootGridEntry.cs
- BooleanSwitch.cs
- Vector3DCollection.cs
- ListItemCollection.cs
- FlowPanelDesigner.cs
- TypedTableBase.cs
- DataTableMapping.cs
- safelink.cs
- InfoCardCryptoHelper.cs
- Effect.cs
- FixedFindEngine.cs
- HMACMD5.cs
- SAPIEngineTypes.cs
- ParameterElement.cs
- Byte.cs
- ToolZone.cs
- ResourceBinder.cs
- WebMessageBodyStyleHelper.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- sqlpipe.cs
- TextBoxLine.cs
- SpotLight.cs
- _SSPISessionCache.cs
- Stackframe.cs
- Line.cs
- MetadataUtilsSmi.cs
- ButtonFlatAdapter.cs
- CodeDOMUtility.cs
- StringUtil.cs
- WsdlParser.cs
- RightsManagementInformation.cs
- TwoPhaseCommit.cs
- TreeNodeBinding.cs
- _PooledStream.cs
- CommonGetThemePartSize.cs
- StateDesigner.LayoutSelectionGlyph.cs
- SafeFileMappingHandle.cs
- ExecutionScope.cs
- ImageSource.cs
- CompilationLock.cs
- XPathAncestorIterator.cs
- PolicyException.cs
- DocumentGridContextMenu.cs
- MailDefinitionBodyFileNameEditor.cs
- ControlsConfig.cs
- DataServices.cs
- InputBuffer.cs
- CheckBoxPopupAdapter.cs
- FontStretchConverter.cs
- SafeRightsManagementPubHandle.cs
- ProcessRequestArgs.cs
- ObjectDataSourceDisposingEventArgs.cs
- DialogResultConverter.cs
- CommandBinding.cs
- DesignerTextViewAdapter.cs
- DesigntimeLicenseContextSerializer.cs
- TextEndOfParagraph.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- FileLogRecordHeader.cs
- GenerateTemporaryTargetAssembly.cs