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
- RadioButtonDesigner.cs
- ApplicationSecurityManager.cs
- SqlCacheDependencySection.cs
- PropertyGrid.cs
- JsonQueryStringConverter.cs
- ContextStack.cs
- FactoryRecord.cs
- DataRow.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataBoundControl.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- ProviderCollection.cs
- ImmComposition.cs
- ObjectStorage.cs
- InitializerFacet.cs
- SuppressIldasmAttribute.cs
- DataServiceResponse.cs
- HttpConfigurationContext.cs
- ResourceSet.cs
- compensatingcollection.cs
- XPathDocumentNavigator.cs
- HighlightOverlayGlyph.cs
- CharacterString.cs
- ContentOperations.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- FormsAuthenticationCredentials.cs
- Identity.cs
- DynamicDataExtensions.cs
- RegisteredDisposeScript.cs
- SQLBinary.cs
- FlowDocumentPage.cs
- TraceHwndHost.cs
- InternalControlCollection.cs
- InputMethodStateTypeInfo.cs
- ContextMarshalException.cs
- FrameAutomationPeer.cs
- TextRunCache.cs
- XmlValueConverter.cs
- CharacterMetrics.cs
- TextBoxLine.cs
- FormsAuthenticationCredentials.cs
- ViewKeyConstraint.cs
- ServiceCredentialsElement.cs
- TimeZone.cs
- RunInstallerAttribute.cs
- Size3D.cs
- DataList.cs
- Ipv6Element.cs
- WorkflowServiceHostFactory.cs
- ProxyWebPartConnectionCollection.cs
- ServiceKnownTypeAttribute.cs
- ISessionStateStore.cs
- WebPartsPersonalizationAuthorization.cs
- BooleanExpr.cs
- ListBindingConverter.cs
- odbcmetadatacolumnnames.cs
- ModelUtilities.cs
- GacUtil.cs
- VScrollProperties.cs
- ContainerUtilities.cs
- PropertyInformation.cs
- ElementInit.cs
- DBSchemaTable.cs
- Int64Converter.cs
- SerialStream.cs
- WebMessageEncodingBindingElement.cs
- EntityDataSourceDesignerHelper.cs
- KeyTimeConverter.cs
- versioninfo.cs
- EntityContainerEntitySet.cs
- CalendarDateChangedEventArgs.cs
- HostVisual.cs
- cookie.cs
- Relationship.cs
- DataGridViewTopLeftHeaderCell.cs
- HashAlgorithm.cs
- LocatorBase.cs
- ConnectionString.cs
- AuthenticationService.cs
- DataGridViewHitTestInfo.cs
- PageParser.cs
- XmlWhitespace.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- TraceContext.cs
- SequentialUshortCollection.cs
- ModuleConfigurationInfo.cs
- ButtonRenderer.cs
- BindingParameterCollection.cs
- DragDrop.cs
- Rotation3DAnimationBase.cs
- DataGridTableCollection.cs
- HtmlInputReset.cs
- ToolStripOverflow.cs
- StringReader.cs
- SqlStatistics.cs
- PageBreakRecord.cs
- StringValueConverter.cs
- NodeFunctions.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- Int16Converter.cs