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
- RegexCapture.cs
- cookiecontainer.cs
- Stack.cs
- SmtpNegotiateAuthenticationModule.cs
- basecomparevalidator.cs
- PageMediaType.cs
- ResolveNameEventArgs.cs
- ParserOptions.cs
- RequestStatusBarUpdateEventArgs.cs
- SafeIUnknown.cs
- TextDecorationCollection.cs
- StateBag.cs
- OrderedDictionary.cs
- Popup.cs
- entityreference_tresulttype.cs
- SqlRecordBuffer.cs
- Mappings.cs
- KnownTypesHelper.cs
- DbProviderFactories.cs
- XmlSchemaAnyAttribute.cs
- PathFigureCollection.cs
- ClockGroup.cs
- BadImageFormatException.cs
- NotCondition.cs
- AutomationPropertyInfo.cs
- DoubleAnimationClockResource.cs
- CharAnimationUsingKeyFrames.cs
- PathFigureCollection.cs
- bindurihelper.cs
- UTF32Encoding.cs
- NetTcpSectionData.cs
- WebResourceAttribute.cs
- ConfigurationStrings.cs
- InvalidFilterCriteriaException.cs
- CorruptingExceptionCommon.cs
- StorageMappingFragment.cs
- Int16Animation.cs
- AuthenticationModuleElementCollection.cs
- Attributes.cs
- InputGestureCollection.cs
- PenThreadWorker.cs
- OleDbEnumerator.cs
- RawAppCommandInputReport.cs
- EditorBrowsableAttribute.cs
- CommandField.cs
- TransactionFlowProperty.cs
- QueuedDeliveryRequirementsMode.cs
- DataService.cs
- shaperfactoryquerycacheentry.cs
- TrackingProfile.cs
- SortDescription.cs
- DataGridViewRowStateChangedEventArgs.cs
- Update.cs
- QilScopedVisitor.cs
- SamlNameIdentifierClaimResource.cs
- OletxCommittableTransaction.cs
- SqlTypesSchemaImporter.cs
- WindowsIdentity.cs
- SqlConnectionHelper.cs
- login.cs
- OutputWindow.cs
- RenderContext.cs
- Storyboard.cs
- DataColumnChangeEvent.cs
- NamespaceImport.cs
- LinkedList.cs
- XmlAnyElementAttribute.cs
- GroupQuery.cs
- Storyboard.cs
- OutgoingWebRequestContext.cs
- GlyphsSerializer.cs
- PrimitiveOperationFormatter.cs
- DelegateTypeInfo.cs
- AuthenticatedStream.cs
- EntityTypeEmitter.cs
- ContextInformation.cs
- CollaborationHelperFunctions.cs
- TokenizerHelper.cs
- WorkflowInstanceExtensionCollection.cs
- httpserverutility.cs
- ClientRuntimeConfig.cs
- DetailsViewPagerRow.cs
- DateTimeOffsetStorage.cs
- OutputCacheProfileCollection.cs
- ParserOptions.cs
- SystemInformation.cs
- ApplicationDirectoryMembershipCondition.cs
- Facet.cs
- DictionaryEntry.cs
- TypeUtil.cs
- VirtualizingStackPanel.cs
- cookiecollection.cs
- NullReferenceException.cs
- WebSysDescriptionAttribute.cs
- ConstructorExpr.cs
- StorageEntityContainerMapping.cs
- FlowchartSizeFeature.cs
- DBConcurrencyException.cs
- NamespaceDecl.cs
- DocumentReference.cs