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
- ClientSession.cs
- DeviceContexts.cs
- ListDictionaryInternal.cs
- GestureRecognitionResult.cs
- Decoder.cs
- IPGlobalProperties.cs
- TextTreePropertyUndoUnit.cs
- PersonalizableAttribute.cs
- AnnotationMap.cs
- GlyphInfoList.cs
- XmlSchemaExternal.cs
- SQLInt32.cs
- LightweightCodeGenerator.cs
- UserControlCodeDomTreeGenerator.cs
- FormViewCommandEventArgs.cs
- HttpBrowserCapabilitiesBase.cs
- CacheOutputQuery.cs
- ArglessEventHandlerProxy.cs
- Ref.cs
- CodeGenerator.cs
- EdgeModeValidation.cs
- _AutoWebProxyScriptWrapper.cs
- CryptoHelper.cs
- MailDefinition.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- TrackingProfileCache.cs
- ProcessModelInfo.cs
- PopupControlService.cs
- PathFigureCollection.cs
- MustUnderstandSoapException.cs
- PageAsyncTask.cs
- CustomUserNameSecurityTokenAuthenticator.cs
- ListViewTableCell.cs
- ConfigsHelper.cs
- StylusPointPropertyId.cs
- UpdatePanelTrigger.cs
- TextOnlyOutput.cs
- Vector.cs
- IndexOutOfRangeException.cs
- MappingSource.cs
- WrappedOptions.cs
- MessageBuilder.cs
- MimePart.cs
- Helpers.cs
- ClientApiGenerator.cs
- ChannelServices.cs
- TextBoxLine.cs
- TextBlockAutomationPeer.cs
- HtmlGenericControl.cs
- DataFormats.cs
- MatrixKeyFrameCollection.cs
- ListDictionaryInternal.cs
- CommandField.cs
- ThreadStaticAttribute.cs
- ItemAutomationPeer.cs
- SliderAutomationPeer.cs
- ValueUnavailableException.cs
- Utility.cs
- WindowsListViewGroup.cs
- BinaryMessageEncodingBindingElement.cs
- EnterpriseServicesHelper.cs
- wmiutil.cs
- SqlServer2KCompatibilityCheck.cs
- PersonalizationStateInfo.cs
- WpfXamlType.cs
- QueryPageSettingsEventArgs.cs
- AsyncResult.cs
- ComponentChangedEvent.cs
- GeometryGroup.cs
- DataObject.cs
- EmbossBitmapEffect.cs
- ObjectQuery.cs
- Int64AnimationBase.cs
- URI.cs
- LogoValidationException.cs
- DeviceFilterDictionary.cs
- SyndicationItemFormatter.cs
- MeasurementDCInfo.cs
- Boolean.cs
- MetafileHeader.cs
- InvalidProgramException.cs
- CodeCatchClauseCollection.cs
- XmlEntityReference.cs
- WindowsListBox.cs
- XamlTypeMapper.cs
- EncoderBestFitFallback.cs
- SystemNetworkInterface.cs
- OuterGlowBitmapEffect.cs
- NativeMethods.cs
- MDIClient.cs
- Matrix.cs
- ReadContentAsBinaryHelper.cs
- XmlFileEditor.cs
- Speller.cs
- NativeMethods.cs
- Atom10FormatterFactory.cs
- ThrowHelper.cs
- BindingSource.cs
- Automation.cs
- _emptywebproxy.cs