Code:
/ DotNET / DotNET / 8.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
- TargetFrameworkAttribute.cs
- DomainUpDown.cs
- DataGridViewLayoutData.cs
- MouseWheelEventArgs.cs
- ExceptionHelpers.cs
- SubtreeProcessor.cs
- MSHTMLHostUtil.cs
- QilTargetType.cs
- CodeBlockBuilder.cs
- MemberProjectedSlot.cs
- DiscoveryReference.cs
- FileCodeGroup.cs
- DataGridViewCell.cs
- Mouse.cs
- HttpListenerContext.cs
- PasswordRecovery.cs
- ToolStripItemCollection.cs
- BooleanProjectedSlot.cs
- AttributeTableBuilder.cs
- HttpPostServerProtocol.cs
- CustomSignedXml.cs
- SqlConnectionStringBuilder.cs
- TcpTransportManager.cs
- AspNetCompatibilityRequirementsMode.cs
- X509Certificate2.cs
- PromptBuilder.cs
- SimpleHandlerFactory.cs
- ObjectSet.cs
- SpellerInterop.cs
- ScrollBarAutomationPeer.cs
- FindRequestContext.cs
- QilLiteral.cs
- SafeRegistryHandle.cs
- DrawingContextDrawingContextWalker.cs
- EventRoute.cs
- WebPartDeleteVerb.cs
- XmlDocumentSerializer.cs
- XsdBuilder.cs
- XmlDataProvider.cs
- Internal.cs
- SortDescriptionCollection.cs
- ObjectDataSourceSelectingEventArgs.cs
- VisualBasicSettingsConverter.cs
- SQLString.cs
- SubordinateTransaction.cs
- Attribute.cs
- InfoCardListRequest.cs
- DataPagerFieldCommandEventArgs.cs
- CopyOnWriteList.cs
- Gdiplus.cs
- XmlDictionaryWriter.cs
- ToolStripManager.cs
- Helper.cs
- HyperLinkDesigner.cs
- CroppedBitmap.cs
- UncommonField.cs
- SQLBinaryStorage.cs
- DBSqlParserColumnCollection.cs
- HostProtectionException.cs
- RegexBoyerMoore.cs
- FormsAuthenticationEventArgs.cs
- RangeValueProviderWrapper.cs
- ListViewInsertedEventArgs.cs
- LogicalTreeHelper.cs
- EntitySet.cs
- OptimizerPatterns.cs
- TabItemAutomationPeer.cs
- ReadOnlyPermissionSet.cs
- XPathScanner.cs
- StreamWriter.cs
- TrustLevel.cs
- TripleDESCryptoServiceProvider.cs
- NumericUpDownAccelerationCollection.cs
- SqlBuilder.cs
- DataColumnMappingCollection.cs
- ValueProviderWrapper.cs
- BufferedGraphicsManager.cs
- COM2Enum.cs
- SQLDateTimeStorage.cs
- FamilyTypefaceCollection.cs
- SystemKeyConverter.cs
- NominalTypeEliminator.cs
- SetIndexBinder.cs
- QualifiedCellIdBoolean.cs
- FormatConvertedBitmap.cs
- DataException.cs
- TypeConverterAttribute.cs
- PeerNameRegistration.cs
- XappLauncher.cs
- PropertyDescriptorCollection.cs
- GridViewColumnHeaderAutomationPeer.cs
- RoutedPropertyChangedEventArgs.cs
- ManagedFilter.cs
- OdbcTransaction.cs
- SubqueryTrackingVisitor.cs
- PublisherIdentityPermission.cs
- XsdDataContractExporter.cs
- DataObjectSettingDataEventArgs.cs
- StringValidator.cs
- SimpleTableProvider.cs