Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Collections / IEnumerable.cs / 1305376 / IEnumerable.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Interface: IEnumerable ** **[....] ** ** ** Purpose: Interface for classes providing IEnumerators ** ** ===========================================================*/ namespace System.Collections { using System; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; // Implement this interface if you need to support VB's foreach semantics. // Also, COM classes that support an enumerator will also implement this interface. [ContractClass(typeof(IEnumerableContract))] [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")] [System.Runtime.InteropServices.ComVisible(true)] public interface IEnumerable { // Interfaces are not serializable // Returns an IEnumerator for this enumerable Object. The enumerator provides // a simple way to access all the contents of a collection. [Pure] [DispId(-4)] IEnumerator GetEnumerator(); } [ContractClassFor(typeof(IEnumerable))] internal class IEnumerableContract : IEnumerable { [Pure] IEnumerator IEnumerable.GetEnumerator() { Contract.Ensures(Contract.Result() != null); return default(IEnumerator); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Interface: IEnumerable ** ** [....] ** ** ** Purpose: Interface for classes providing IEnumerators ** ** ===========================================================*/ namespace System.Collections { using System; using System.Diagnostics.Contracts; using System.Runtime.InteropServices; // Implement this interface if you need to support VB's foreach semantics. // Also, COM classes that support an enumerator will also implement this interface. [ContractClass(typeof(IEnumerableContract))] [Guid("496B0ABE-CDEE-11d3-88E8-00902754C43A")] [System.Runtime.InteropServices.ComVisible(true)] public interface IEnumerable { // Interfaces are not serializable // Returns an IEnumerator for this enumerable Object. The enumerator provides // a simple way to access all the contents of a collection. [Pure] [DispId(-4)] IEnumerator GetEnumerator(); } [ContractClassFor(typeof(IEnumerable))] internal class IEnumerableContract : IEnumerable { [Pure] IEnumerator IEnumerable.GetEnumerator() { Contract.Ensures(Contract.Result() != null); return default(IEnumerator); } } } // 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
- StyleCollection.cs
- AutoGeneratedFieldProperties.cs
- Version.cs
- TypefaceMap.cs
- SafeSystemMetrics.cs
- SqlEnums.cs
- DragStartedEventArgs.cs
- DeviceSpecificDialogCachedState.cs
- CompilerScopeManager.cs
- RecordBuilder.cs
- OracleLob.cs
- CategoryGridEntry.cs
- WebPartActionVerb.cs
- MailBnfHelper.cs
- DesignerDeviceConfig.cs
- MailBnfHelper.cs
- MobileUserControlDesigner.cs
- _DisconnectOverlappedAsyncResult.cs
- ClientEventManager.cs
- OletxCommittableTransaction.cs
- CuspData.cs
- XmlSchemaSubstitutionGroup.cs
- CodePropertyReferenceExpression.cs
- coordinatorfactory.cs
- Expressions.cs
- MenuCommand.cs
- MediaSystem.cs
- DeviceContext.cs
- MethodRental.cs
- ErrorView.xaml.cs
- XD.cs
- PeerTransportSecurityElement.cs
- TopClause.cs
- StringInfo.cs
- Switch.cs
- FrameAutomationPeer.cs
- SqlConnectionPoolGroupProviderInfo.cs
- WhitespaceSignificantCollectionAttribute.cs
- OutputWindow.cs
- ColumnTypeConverter.cs
- DataGridViewTextBoxEditingControl.cs
- ShapingWorkspace.cs
- ServiceRoute.cs
- Stream.cs
- EntityViewGenerationAttribute.cs
- DefinitionUpdate.cs
- BasicBrowserDialog.designer.cs
- NetworkStream.cs
- DataGridCellsPresenter.cs
- PopOutPanel.cs
- HighContrastHelper.cs
- DbConnectionOptions.cs
- TreeViewCancelEvent.cs
- StronglyTypedResourceBuilder.cs
- FullTextState.cs
- CollectionViewProxy.cs
- Documentation.cs
- TableRow.cs
- SqlCacheDependencyDatabase.cs
- XmlSchemaProviderAttribute.cs
- DesignParameter.cs
- ByteStorage.cs
- ProfessionalColorTable.cs
- PaperSource.cs
- ListDesigner.cs
- GACIdentityPermission.cs
- Membership.cs
- PagedDataSource.cs
- ArrayList.cs
- BindingOperations.cs
- CodeCatchClause.cs
- CodePageUtils.cs
- EditorPartChrome.cs
- InfoCardSymmetricAlgorithm.cs
- PolyLineSegment.cs
- WebPartHeaderCloseVerb.cs
- ClientBuildManager.cs
- BatchParser.cs
- SiteMapDataSource.cs
- RSAProtectedConfigurationProvider.cs
- StylusPointProperty.cs
- RestHandler.cs
- TextBoxAutoCompleteSourceConverter.cs
- Site.cs
- TreeBuilder.cs
- ConfigurationConverterBase.cs
- ToolZoneDesigner.cs
- XmlChildNodes.cs
- BamlVersionHeader.cs
- FixedSOMFixedBlock.cs
- InfoCardBaseException.cs
- ResourceReferenceExpressionConverter.cs
- StrongNamePublicKeyBlob.cs
- SqlCacheDependencyDatabase.cs
- TemplateXamlTreeBuilder.cs
- CellParagraph.cs
- MimeMapping.cs
- RangeValueProviderWrapper.cs
- AutomationPatternInfo.cs
- SafeLibraryHandle.cs