Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / ProviderConnectionPointCollection.cs / 1 / ProviderConnectionPointCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ProviderConnectionPointCollection : ReadOnlyCollectionBase { private HybridDictionary _ids; public ProviderConnectionPointCollection() { } public ProviderConnectionPointCollection(ICollection connectionPoints) { if (connectionPoints == null) { throw new ArgumentNullException("connectionPoints"); } _ids = new HybridDictionary(connectionPoints.Count, true /* caseInsensitive */); foreach (object obj in connectionPoints) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "connectionPoints"); } ProviderConnectionPoint point = obj as ProviderConnectionPoint; if (point == null) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "ProviderConnectionPoint"), "connectionPoints"); } string id = point.ID; if (!_ids.Contains(id)) { InnerList.Add(point); _ids.Add(id, point); } else { throw new ArgumentException(SR.GetString( SR.WebPart_Collection_DuplicateID, "ProviderConnectionPoint", id), "connectionPoints"); } } } public ProviderConnectionPoint Default { get { return this[ConnectionPoint.DefaultID]; } } public ProviderConnectionPoint this[int index] { get { return (ProviderConnectionPoint)InnerList[index]; } } public ProviderConnectionPoint this[string id] { get { return ((_ids != null) ? (ProviderConnectionPoint)_ids[id] : null); } } public bool Contains(ProviderConnectionPoint connectionPoint) { return InnerList.Contains(connectionPoint); } public int IndexOf(ProviderConnectionPoint connectionPoint) { return InnerList.IndexOf(connectionPoint); } public void CopyTo(ProviderConnectionPoint[] 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. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ProviderConnectionPointCollection : ReadOnlyCollectionBase { private HybridDictionary _ids; public ProviderConnectionPointCollection() { } public ProviderConnectionPointCollection(ICollection connectionPoints) { if (connectionPoints == null) { throw new ArgumentNullException("connectionPoints"); } _ids = new HybridDictionary(connectionPoints.Count, true /* caseInsensitive */); foreach (object obj in connectionPoints) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "connectionPoints"); } ProviderConnectionPoint point = obj as ProviderConnectionPoint; if (point == null) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "ProviderConnectionPoint"), "connectionPoints"); } string id = point.ID; if (!_ids.Contains(id)) { InnerList.Add(point); _ids.Add(id, point); } else { throw new ArgumentException(SR.GetString( SR.WebPart_Collection_DuplicateID, "ProviderConnectionPoint", id), "connectionPoints"); } } } public ProviderConnectionPoint Default { get { return this[ConnectionPoint.DefaultID]; } } public ProviderConnectionPoint this[int index] { get { return (ProviderConnectionPoint)InnerList[index]; } } public ProviderConnectionPoint this[string id] { get { return ((_ids != null) ? (ProviderConnectionPoint)_ids[id] : null); } } public bool Contains(ProviderConnectionPoint connectionPoint) { return InnerList.Contains(connectionPoint); } public int IndexOf(ProviderConnectionPoint connectionPoint) { return InnerList.IndexOf(connectionPoint); } public void CopyTo(ProviderConnectionPoint[] 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PrintDialog.cs
- ImageAttributes.cs
- DataGridViewButtonCell.cs
- OutputCacheProfileCollection.cs
- BufferedGraphics.cs
- HttpHeaderCollection.cs
- SystemUnicastIPAddressInformation.cs
- PolygonHotSpot.cs
- ImageMapEventArgs.cs
- sitestring.cs
- ConditionalAttribute.cs
- StructuralType.cs
- XslUrlEditor.cs
- RtType.cs
- DetailsViewInsertedEventArgs.cs
- CreateUserWizardAutoFormat.cs
- ZipIOLocalFileBlock.cs
- EllipticalNodeOperations.cs
- httpapplicationstate.cs
- TextChange.cs
- CodeGotoStatement.cs
- TypeLoadException.cs
- SpStreamWrapper.cs
- StrongNameUtility.cs
- ProcessModelSection.cs
- CollectionViewSource.cs
- TargetPerspective.cs
- TextSearch.cs
- ComNativeDescriptor.cs
- newinstructionaction.cs
- ImageIndexConverter.cs
- ContractsBCL.cs
- QilCloneVisitor.cs
- CompiledELinqQueryState.cs
- CommentEmitter.cs
- ContentPlaceHolder.cs
- AVElementHelper.cs
- SecurityMessageProperty.cs
- LoadedEvent.cs
- WSFederationHttpSecurityElement.cs
- AssignDesigner.xaml.cs
- PathFigure.cs
- ToolStripItemDataObject.cs
- ObjectManager.cs
- DbProviderSpecificTypePropertyAttribute.cs
- XamlWriterExtensions.cs
- ResourcePool.cs
- TreeNodeSelectionProcessor.cs
- Utility.cs
- ValidationService.cs
- CurrentChangedEventManager.cs
- ProfileBuildProvider.cs
- ChangeTracker.cs
- EventMetadata.cs
- FamilyTypefaceCollection.cs
- CatalogPartCollection.cs
- XmlSchemaExporter.cs
- ClientScriptManager.cs
- HostedElements.cs
- DbMetaDataFactory.cs
- Point3DCollection.cs
- EntityDataSourceWrapperCollection.cs
- XPathNodeHelper.cs
- CompModHelpers.cs
- HttpCookiesSection.cs
- AsyncCompletedEventArgs.cs
- EditingCoordinator.cs
- ColorTransform.cs
- SuspendDesigner.cs
- AttributeInfo.cs
- NetworkCredential.cs
- HiddenFieldPageStatePersister.cs
- PropertyMapper.cs
- ToolBarButton.cs
- StringArrayConverter.cs
- RegexCharClass.cs
- EnumValAlphaComparer.cs
- BitVec.cs
- RemoteHelper.cs
- ApplicationId.cs
- ModelPerspective.cs
- COM2Properties.cs
- Point3DCollection.cs
- WindowsFormsHost.cs
- DataRowChangeEvent.cs
- XmlChoiceIdentifierAttribute.cs
- WarningException.cs
- InputManager.cs
- DataTablePropertyDescriptor.cs
- ParameterToken.cs
- Simplifier.cs
- Parser.cs
- ButtonAutomationPeer.cs
- RsaKeyIdentifierClause.cs
- TransformerTypeCollection.cs
- QEncodedStream.cs
- DatatypeImplementation.cs
- TextRange.cs
- Command.cs
- MetadataPropertyAttribute.cs