Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionInterfaceCollection.cs / 1 / ConnectionInterfaceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewElement.cs
- ViewGenResults.cs
- ManipulationDevice.cs
- AppDomainManager.cs
- AppDomainUnloadedException.cs
- CalendarDesigner.cs
- TypedDataSetSchemaImporterExtension.cs
- TagPrefixInfo.cs
- VideoDrawing.cs
- DataListItemEventArgs.cs
- SiteMap.cs
- OutputCacheProfile.cs
- followingquery.cs
- NativeMethods.cs
- CmsInterop.cs
- ServiceEndpointCollection.cs
- XmlIlGenerator.cs
- RequestBringIntoViewEventArgs.cs
- Button.cs
- CodeObject.cs
- _Win32.cs
- List.cs
- DesignerCatalogPartChrome.cs
- RepeatInfo.cs
- DeploymentExceptionMapper.cs
- SQLInt16.cs
- SelectionItemPattern.cs
- SystemMulticastIPAddressInformation.cs
- ColumnMapCopier.cs
- ValueExpressions.cs
- ECDiffieHellmanPublicKey.cs
- SerTrace.cs
- NameTable.cs
- TemplatePartAttribute.cs
- Int16KeyFrameCollection.cs
- Trustee.cs
- _ConnectStream.cs
- SecureEnvironment.cs
- SqlParameterizer.cs
- VerificationException.cs
- path.cs
- NativeMethods.cs
- SafeNativeMethods.cs
- AdornerDecorator.cs
- PermissionToken.cs
- ClientData.cs
- PrePrepareMethodAttribute.cs
- MarshalByRefObject.cs
- HorizontalAlignConverter.cs
- BrowserCapabilitiesFactory.cs
- ApplicationDirectory.cs
- ToolStripHighContrastRenderer.cs
- RadioButtonRenderer.cs
- HttpResponseHeader.cs
- Int32Rect.cs
- FileDialogCustomPlace.cs
- XmlQualifiedName.cs
- CookieProtection.cs
- XmlDataSourceNodeDescriptor.cs
- ServiceDescription.cs
- odbcmetadatacolumnnames.cs
- TypeInitializationException.cs
- Group.cs
- XmlCountingReader.cs
- Light.cs
- KeyedCollection.cs
- CharacterMetrics.cs
- ToolStripScrollButton.cs
- PropertyGridCommands.cs
- AspNetPartialTrustHelpers.cs
- DataGridViewRowHeaderCell.cs
- SQLDecimal.cs
- PolygonHotSpot.cs
- UInt64Storage.cs
- WindowsClientElement.cs
- RemotingAttributes.cs
- DictionaryBase.cs
- HostedTransportConfigurationBase.cs
- OutputWindow.cs
- BitmapEffectGeneralTransform.cs
- SafeNativeMethods.cs
- DispatcherHookEventArgs.cs
- DBNull.cs
- CmsInterop.cs
- XmlElementAttribute.cs
- DeviceSpecificDialogCachedState.cs
- sqlnorm.cs
- HtmlGenericControl.cs
- ConnectionsZone.cs
- CompositeFontParser.cs
- StringValidatorAttribute.cs
- metadatamappinghashervisitor.cs
- ExceptionHandler.cs
- XPathNodeList.cs
- MachineKeyConverter.cs
- TextChange.cs
- ValidationErrorCollection.cs
- WebExceptionStatus.cs
- StorageModelBuildProvider.cs
- ToolBarPanel.cs