Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionInterfaceCollection.cs / 1305376 / ConnectionInterfaceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.ComponentModel; public sealed class ConnectionInterfaceCollection : ReadOnlyCollectionBase { public static readonly ConnectionInterfaceCollection Empty = new ConnectionInterfaceCollection(); public ConnectionInterfaceCollection() { } public ConnectionInterfaceCollection(ICollection connectionInterfaces) { Initialize(null, connectionInterfaces); } public ConnectionInterfaceCollection(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { Initialize(existingConnectionInterfaces, connectionInterfaces); } private void Initialize(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { if (existingConnectionInterfaces != null) { foreach (Type existingConnectionInterface in existingConnectionInterfaces) { // Don't need to check arg, since we know it is valid since it came // from a ConnectionInterfaceCollection. InnerList.Add(existingConnectionInterface); } } if (connectionInterfaces != null) { foreach (object obj in connectionInterfaces) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "connectionInterfaces"); } if (!(obj is Type)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "Type"), "connectionInterfaces"); } InnerList.Add(obj); } } } public bool Contains(Type value) { return InnerList.Contains(value); } public int IndexOf(Type value) { return InnerList.IndexOf(value); } public Type this[int index] { get { return (Type)InnerList[index]; } } public void CopyTo(Type[] array, int index) { InnerList.CopyTo(array, index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.ComponentModel; public sealed class ConnectionInterfaceCollection : ReadOnlyCollectionBase { public static readonly ConnectionInterfaceCollection Empty = new ConnectionInterfaceCollection(); public ConnectionInterfaceCollection() { } public ConnectionInterfaceCollection(ICollection connectionInterfaces) { Initialize(null, connectionInterfaces); } public ConnectionInterfaceCollection(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { Initialize(existingConnectionInterfaces, connectionInterfaces); } private void Initialize(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { if (existingConnectionInterfaces != null) { foreach (Type existingConnectionInterface in existingConnectionInterfaces) { // Don't need to check arg, since we know it is valid since it came // from a ConnectionInterfaceCollection. InnerList.Add(existingConnectionInterface); } } if (connectionInterfaces != null) { foreach (object obj in connectionInterfaces) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "connectionInterfaces"); } if (!(obj is Type)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "Type"), "connectionInterfaces"); } InnerList.Add(obj); } } } public bool Contains(Type value) { return InnerList.Contains(value); } public int IndexOf(Type value) { return InnerList.IndexOf(value); } public Type this[int index] { get { return (Type)InnerList[index]; } } public void CopyTo(Type[] array, int index) { InnerList.CopyTo(array, index); } } } // 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
- ElapsedEventArgs.cs
- CommonRemoteMemoryBlock.cs
- WSDualHttpBindingElement.cs
- StringAttributeCollection.cs
- ProfileInfo.cs
- UnsignedPublishLicense.cs
- PublishLicense.cs
- TextTabProperties.cs
- SwitchAttribute.cs
- NetworkInformationPermission.cs
- GridItemPattern.cs
- UTF8Encoding.cs
- COM2IDispatchConverter.cs
- ObjectContext.cs
- TextEditorContextMenu.cs
- ReferenceEqualityComparer.cs
- PrimitiveXmlSerializers.cs
- DataGridHeaderBorder.cs
- RegistryKey.cs
- BufferedStream.cs
- DataBoundControlActionList.cs
- WebPartChrome.cs
- LockCookie.cs
- XhtmlBasicLabelAdapter.cs
- EventsTab.cs
- VectorAnimationUsingKeyFrames.cs
- XmlSchemaExternal.cs
- QueryComponents.cs
- ObjectStateManager.cs
- DSASignatureDeformatter.cs
- ping.cs
- TextStore.cs
- VoiceChangeEventArgs.cs
- AttributeProviderAttribute.cs
- IfAction.cs
- RowsCopiedEventArgs.cs
- MobileResource.cs
- CodeTypeOfExpression.cs
- ExtractorMetadata.cs
- DataGridViewEditingControlShowingEventArgs.cs
- DataGrid.cs
- DebugInfoGenerator.cs
- FamilyMap.cs
- MatrixAnimationUsingPath.cs
- ResourceReferenceKeyNotFoundException.cs
- EpmAttributeNameBuilder.cs
- StateDesigner.cs
- SQLByteStorage.cs
- RowCache.cs
- NavigationHelper.cs
- ToolboxComponentsCreatingEventArgs.cs
- Attachment.cs
- DispatcherEventArgs.cs
- ObjectDataSourceStatusEventArgs.cs
- ISessionStateStore.cs
- ScriptReferenceEventArgs.cs
- UIElement3DAutomationPeer.cs
- XmlSerializerFactory.cs
- UndoEngine.cs
- LookupNode.cs
- ListBoxAutomationPeer.cs
- PermissionRequestEvidence.cs
- TextEmbeddedObject.cs
- SvcMapFileSerializer.cs
- ResourceDictionaryCollection.cs
- InputScopeManager.cs
- ExtensionDataReader.cs
- AncestorChangedEventArgs.cs
- SqlInternalConnection.cs
- CustomErrorsSectionWrapper.cs
- FlatButtonAppearance.cs
- TileModeValidation.cs
- ApplicationDirectory.cs
- QuotedPrintableStream.cs
- ExtendedProtectionPolicyElement.cs
- ParserExtension.cs
- StatusBarItemAutomationPeer.cs
- CommandConverter.cs
- QilTargetType.cs
- ClientRolePrincipal.cs
- followingsibling.cs
- ThemeInfoAttribute.cs
- RemoteWebConfigurationHostStream.cs
- COM2IDispatchConverter.cs
- TagNameToTypeMapper.cs
- SimpleTableProvider.cs
- autovalidator.cs
- HttpCachePolicyElement.cs
- ScriptingRoleServiceSection.cs
- RepeaterItemCollection.cs
- SerTrace.cs
- WinEventWrap.cs
- PointKeyFrameCollection.cs
- PictureBoxDesigner.cs
- SharedConnectionInfo.cs
- TCEAdapterGenerator.cs
- SafeNativeMethods.cs
- ComPlusServiceLoader.cs
- dtdvalidator.cs
- SignerInfo.cs