Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // 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; 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); } } } // 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
- SqlExpressionNullability.cs
- TemplatedAdorner.cs
- PropertyKey.cs
- HeaderedItemsControl.cs
- GenericAuthenticationEventArgs.cs
- ItemDragEvent.cs
- GorillaCodec.cs
- SqlHelper.cs
- Configuration.cs
- XmlNodeList.cs
- CalendarTable.cs
- ObjectDataSourceMethodEventArgs.cs
- ObjRef.cs
- SymbolType.cs
- ThreadPoolTaskScheduler.cs
- ViewBox.cs
- CommonObjectSecurity.cs
- ScriptResourceAttribute.cs
- dbenumerator.cs
- Int32Animation.cs
- SevenBitStream.cs
- MD5.cs
- Normalizer.cs
- EntityDataSourceEntitySetNameItem.cs
- WebUtil.cs
- AncestorChangedEventArgs.cs
- OpacityConverter.cs
- DropShadowEffect.cs
- DataSourceProvider.cs
- ServerType.cs
- ProfileElement.cs
- SQLMoneyStorage.cs
- Literal.cs
- FileDetails.cs
- UIElementCollection.cs
- TripleDESCryptoServiceProvider.cs
- FragmentNavigationEventArgs.cs
- DispatchChannelSink.cs
- AppDomainUnloadedException.cs
- WebPartManagerInternals.cs
- PostBackOptions.cs
- FileSystemWatcher.cs
- ChangeTracker.cs
- AutoGeneratedFieldProperties.cs
- LinqDataSourceHelper.cs
- ImmutableCollection.cs
- DynamicDocumentPaginator.cs
- FontStretches.cs
- EventLogEntryCollection.cs
- WebPartUtil.cs
- SafeReversePInvokeHandle.cs
- TraversalRequest.cs
- NumericUpDownAccelerationCollection.cs
- XmlCharType.cs
- FlagsAttribute.cs
- TextSelectionProcessor.cs
- SQLSingleStorage.cs
- StorageFunctionMapping.cs
- ExpressionVisitorHelpers.cs
- SqlClientFactory.cs
- Model3DGroup.cs
- KeyTime.cs
- MenuItemBindingCollection.cs
- UiaCoreProviderApi.cs
- ButtonPopupAdapter.cs
- XPathScanner.cs
- DeleteBookmarkScope.cs
- SubclassTypeValidator.cs
- UserControl.cs
- NGCUIElementCollectionSerializerAsync.cs
- Sql8ExpressionRewriter.cs
- PageParserFilter.cs
- XmlBoundElement.cs
- VirtualPathProvider.cs
- DynamicActivity.cs
- DataMemberConverter.cs
- ActivityScheduledQuery.cs
- SoapObjectWriter.cs
- RecognizerInfo.cs
- WindowsIdentity.cs
- RsaSecurityTokenAuthenticator.cs
- SqlInternalConnectionTds.cs
- Style.cs
- XMLSchema.cs
- OverflowException.cs
- SetState.cs
- InvokeGenerator.cs
- ScrollItemProviderWrapper.cs
- ContextMenuStrip.cs
- DeferredElementTreeState.cs
- PreparingEnlistment.cs
- StateDesignerConnector.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- SqlCacheDependencyDatabaseCollection.cs
- BigInt.cs
- EdmRelationshipNavigationPropertyAttribute.cs
- RoutedEventConverter.cs
- OleDbPropertySetGuid.cs
- WindowsScrollBarBits.cs
- ColorConverter.cs