Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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.
//------------------------------------------------------------------------------
//
// 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigurationElementProperty.cs
- ValueTable.cs
- WebRequest.cs
- ToolboxDataAttribute.cs
- BatchServiceHost.cs
- Invariant.cs
- UserMapPath.cs
- SchemaMapping.cs
- EncoderFallback.cs
- SecurityElement.cs
- DocumentSequence.cs
- ArgIterator.cs
- MaterialGroup.cs
- SqlTopReducer.cs
- EventSinkHelperWriter.cs
- SqlInternalConnectionSmi.cs
- VirtualDirectoryMappingCollection.cs
- RegexRunnerFactory.cs
- JsonReaderDelegator.cs
- SecurityStandardsManager.cs
- MatrixCamera.cs
- ReceiveMessageRecord.cs
- ProcessHostServerConfig.cs
- SharedConnectionListener.cs
- PassportAuthenticationModule.cs
- TypeContext.cs
- WindowsSecurityToken.cs
- DisplayToken.cs
- CombinedGeometry.cs
- HttpModuleActionCollection.cs
- ThreadStaticAttribute.cs
- XNodeNavigator.cs
- DateTimeOffsetConverter.cs
- DrawingAttributesDefaultValueFactory.cs
- EventMappingSettings.cs
- ObjectManager.cs
- DataStorage.cs
- DbDataRecord.cs
- LoadRetryConstantStrategy.cs
- XmlByteStreamWriter.cs
- ItemsPanelTemplate.cs
- Config.cs
- SafeEventLogWriteHandle.cs
- HttpCookiesSection.cs
- JapaneseCalendar.cs
- Thickness.cs
- DataViewManagerListItemTypeDescriptor.cs
- StyleModeStack.cs
- BuildProvider.cs
- Misc.cs
- BrowserDefinitionCollection.cs
- RealizationContext.cs
- LazyTextWriterCreator.cs
- PauseStoryboard.cs
- Function.cs
- MetabaseReader.cs
- Style.cs
- Component.cs
- ExpressionReplacer.cs
- ModuleElement.cs
- PersonalizationAdministration.cs
- XmlNamespaceDeclarationsAttribute.cs
- XmlTextReaderImpl.cs
- ScrollProviderWrapper.cs
- _NegoStream.cs
- TypeLibConverter.cs
- ContainsRowNumberChecker.cs
- _WinHttpWebProxyDataBuilder.cs
- BindingExpression.cs
- ValueUnavailableException.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- NonVisualControlAttribute.cs
- AppDomainAttributes.cs
- IisTraceListener.cs
- SubtreeProcessor.cs
- OlePropertyStructs.cs
- CoreSwitches.cs
- PkcsMisc.cs
- HttpCapabilitiesBase.cs
- RecommendedAsConfigurableAttribute.cs
- SerialErrors.cs
- EmbeddedObject.cs
- HealthMonitoringSectionHelper.cs
- SearchForVirtualItemEventArgs.cs
- ThousandthOfEmRealPoints.cs
- TimeSpan.cs
- SamlAttributeStatement.cs
- AndMessageFilterTable.cs
- WebHttpDispatchOperationSelectorData.cs
- HMACMD5.cs
- BatchWriter.cs
- SafeProcessHandle.cs
- StringStorage.cs
- FolderBrowserDialogDesigner.cs
- Hashtable.cs
- HtmlValidatorAdapter.cs
- PermissionSetEnumerator.cs
- ToolBarButton.cs
- ChannelDispatcherCollection.cs
- WebDescriptionAttribute.cs