Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / MS / Internal / Controls / EmptyEnumerator.cs / 1305600 / EmptyEnumerator.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // // Description: Empty enumerator // // History: // 02/26/2004 : JeffBog stole from ItemsView (and stole comments from UIAutomation) // //--------------------------------------------------------------------------- using System; using System.Collections; namespace MS.Internal.Controls { ////// Returns an Enumerator that enumerates over nothing. /// internal class EmptyEnumerator: IEnumerator { // singleton class, private ctor private EmptyEnumerator() { } ////// Read-Only instance of an Empty Enumerator. /// public static IEnumerator Instance { get { if (_instance == null) { _instance = new EmptyEnumerator(); } return _instance; } } ////// Does nothing. /// public void Reset() { } ////// Returns false. /// ///false public bool MoveNext() { return false; } #pragma warning disable 1634, 1691 // about to use PreSharp message numbers - unknown to C# ////// Returns null. /// public object Current { get { #pragma warning disable 6503 // "Property get methods should not throw exceptions." throw new InvalidOperationException(); #pragma warning restore 6503 } } #pragma warning restore 1634, 1691 private static IEnumerator _instance; } } // 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
- TraceContextRecord.cs
- BuildProvidersCompiler.cs
- DESCryptoServiceProvider.cs
- ScriptRegistrationManager.cs
- BuildDependencySet.cs
- SortDescription.cs
- CodeNamespaceImportCollection.cs
- Clipboard.cs
- XmlToDatasetMap.cs
- CriticalExceptions.cs
- EntityProxyTypeInfo.cs
- ComNativeDescriptor.cs
- AdapterUtil.cs
- ListSortDescriptionCollection.cs
- Delegate.cs
- SqlDataSourceConfigureSelectPanel.cs
- XPathItem.cs
- SqlStatistics.cs
- CacheOutputQuery.cs
- PolicyValidator.cs
- WorkflowRuntimeBehavior.cs
- DebugManager.cs
- AssociationSet.cs
- AnimationLayer.cs
- SeverityFilter.cs
- XmlSchemaCompilationSettings.cs
- CodeStatement.cs
- diagnosticsswitches.cs
- TextElementCollectionHelper.cs
- DbBuffer.cs
- MetadataCache.cs
- ResXBuildProvider.cs
- XmlElement.cs
- ReceiveContext.cs
- OleServicesContext.cs
- DownloadProgressEventArgs.cs
- InputLanguageCollection.cs
- FormsAuthenticationModule.cs
- SspiNegotiationTokenAuthenticatorState.cs
- SafeArchiveContext.cs
- WorkflowWebService.cs
- ScriptIgnoreAttribute.cs
- BindingMAnagerBase.cs
- WinInetCache.cs
- IgnoreSectionHandler.cs
- DrawingCollection.cs
- Helper.cs
- LinqExpressionNormalizer.cs
- MappingModelBuildProvider.cs
- DocumentPageHost.cs
- HashCodeCombiner.cs
- basecomparevalidator.cs
- Attributes.cs
- Visual.cs
- RectangleHotSpot.cs
- GenericPrincipal.cs
- Stylus.cs
- PTProvider.cs
- AddInActivator.cs
- HashCryptoHandle.cs
- x509utils.cs
- SystemIPAddressInformation.cs
- FontNamesConverter.cs
- UriTemplateMatch.cs
- EdmPropertyAttribute.cs
- ContainerFilterService.cs
- SoapClientMessage.cs
- CacheForPrimitiveTypes.cs
- UIInitializationException.cs
- CollectionChangeEventArgs.cs
- ConfigurationStrings.cs
- GrammarBuilderWildcard.cs
- InvokePatternIdentifiers.cs
- RelationshipSet.cs
- DBSqlParser.cs
- EqualityComparer.cs
- BrowserCapabilitiesFactoryBase.cs
- Dispatcher.cs
- MethodToken.cs
- CursorConverter.cs
- HttpCapabilitiesBase.cs
- ObjectDataSourceFilteringEventArgs.cs
- WebUtility.cs
- MetabaseReader.cs
- sqlser.cs
- SpellerHighlightLayer.cs
- DataBindingExpressionBuilder.cs
- ThreadPool.cs
- TraceContextRecord.cs
- ServiceDescriptionSerializer.cs
- RemoteX509Token.cs
- GroupQuery.cs
- Rfc2898DeriveBytes.cs
- XmlWellformedWriter.cs
- IISMapPath.cs
- dbenumerator.cs
- CookieHandler.cs
- X509Utils.cs
- PathFigureCollection.cs
- TemplateColumn.cs