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
- PageOrientation.cs
- Models.cs
- LayoutTableCell.cs
- UInt32Converter.cs
- MetadataItemSerializer.cs
- ResXDataNode.cs
- ImageAutomationPeer.cs
- SocketElement.cs
- MarginsConverter.cs
- ClientRoleProvider.cs
- Rotation3DKeyFrameCollection.cs
- XmlWriter.cs
- Scene3D.cs
- AccessText.cs
- HttpValueCollection.cs
- BufferCache.cs
- AllMembershipCondition.cs
- RegistrySecurity.cs
- TrailingSpaceComparer.cs
- BuilderInfo.cs
- VectorCollectionConverter.cs
- ContainerFilterService.cs
- EditorAttribute.cs
- ObjectDataSourceSelectingEventArgs.cs
- DataGridViewCellConverter.cs
- UInt32Converter.cs
- CheckBoxAutomationPeer.cs
- COM2ExtendedUITypeEditor.cs
- PowerStatus.cs
- ImageIndexConverter.cs
- TabControlEvent.cs
- RegionInfo.cs
- _Connection.cs
- SqlXmlStorage.cs
- GridViewDesigner.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- DifferencingCollection.cs
- ComplusEndpointConfigContainer.cs
- TickBar.cs
- Environment.cs
- WebPartMenuStyle.cs
- SocketCache.cs
- ProfilePropertySettings.cs
- ComponentEditorPage.cs
- StorageEntityContainerMapping.cs
- PageAdapter.cs
- InputLanguage.cs
- XmlHierarchicalDataSourceView.cs
- BufferedStream.cs
- ComplexBindingPropertiesAttribute.cs
- IsolatedStorageFile.cs
- Graph.cs
- ConvertTextFrag.cs
- StateMachineDesignerPaint.cs
- CornerRadiusConverter.cs
- ICspAsymmetricAlgorithm.cs
- InputLanguageEventArgs.cs
- ParseHttpDate.cs
- QilSortKey.cs
- ElementHostAutomationPeer.cs
- PathFigure.cs
- SqlProviderServices.cs
- IncrementalHitTester.cs
- RecipientInfo.cs
- SecurityUtils.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- DataFormats.cs
- DefaultSerializationProviderAttribute.cs
- InternalConfigEventArgs.cs
- HtmlInputControl.cs
- Automation.cs
- AutomationProperties.cs
- BasicExpandProvider.cs
- XmlEntityReference.cs
- GACMembershipCondition.cs
- HtmlTextBoxAdapter.cs
- MetaModel.cs
- BoundsDrawingContextWalker.cs
- ContentWrapperAttribute.cs
- ColumnMapCopier.cs
- Int64Animation.cs
- VScrollProperties.cs
- SocketStream.cs
- SortedList.cs
- SimpleHandlerFactory.cs
- StylusPointPropertyInfoDefaults.cs
- TextAction.cs
- VirtualizingPanel.cs
- XmlComplianceUtil.cs
- IndependentlyAnimatedPropertyMetadata.cs
- TextWriterTraceListener.cs
- FlowDocumentFormatter.cs
- TextTreeExtractElementUndoUnit.cs
- WebEventCodes.cs
- DesignerVerb.cs
- WebEvents.cs
- DecodeHelper.cs
- ContainerParaClient.cs
- SqlProviderManifest.cs
- WizardStepBase.cs