Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IssuanceLicense.cs
- EdgeModeValidation.cs
- TabItem.cs
- DataGridPagingPage.cs
- ActiveXSite.cs
- RegionData.cs
- IdentifierService.cs
- BasicCellRelation.cs
- ListViewUpdateEventArgs.cs
- WaitForChangedResult.cs
- AnnotationComponentChooser.cs
- CompressionTransform.cs
- ClaimTypeRequirement.cs
- MeasureItemEvent.cs
- CodeTypeReference.cs
- MsmqOutputSessionChannel.cs
- ProcessInfo.cs
- DBDataPermissionAttribute.cs
- UnaryNode.cs
- SegmentInfo.cs
- DBDataPermission.cs
- WebServiceParameterData.cs
- WebPartHelpVerb.cs
- PathFigure.cs
- MD5HashHelper.cs
- elementinformation.cs
- DataGridViewSelectedRowCollection.cs
- HtmlInputPassword.cs
- EndpointConfigContainer.cs
- Brush.cs
- HostedAspNetEnvironment.cs
- BStrWrapper.cs
- CacheOutputQuery.cs
- GlobalEventManager.cs
- Header.cs
- TypeUsageBuilder.cs
- RNGCryptoServiceProvider.cs
- QueueException.cs
- MethodImplAttribute.cs
- ParamArrayAttribute.cs
- HashAlgorithm.cs
- ListBindingConverter.cs
- GroupItem.cs
- RuntimeIdentifierPropertyAttribute.cs
- GroupByExpressionRewriter.cs
- SafeEventHandle.cs
- DispatcherOperation.cs
- BulletDecorator.cs
- KeyEvent.cs
- Geometry3D.cs
- RC2CryptoServiceProvider.cs
- DataTablePropertyDescriptor.cs
- UnsafeNativeMethods.cs
- sqlser.cs
- Int32Rect.cs
- PageCatalogPart.cs
- FixedTextBuilder.cs
- StringValidatorAttribute.cs
- ObjectRef.cs
- HtmlImageAdapter.cs
- SoapParser.cs
- RoleGroup.cs
- ClientUtils.cs
- StringUtil.cs
- CornerRadius.cs
- TextTabProperties.cs
- AppSecurityManager.cs
- TabRenderer.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- GridViewCancelEditEventArgs.cs
- CompModSwitches.cs
- EntityCommandCompilationException.cs
- XmlUrlEditor.cs
- CharAnimationBase.cs
- ContainerFilterService.cs
- SQLMembershipProvider.cs
- odbcmetadatacolumnnames.cs
- Visual3D.cs
- NonceToken.cs
- TextPenaltyModule.cs
- Vector3DCollectionConverter.cs
- TaiwanCalendar.cs
- ProxyBuilder.cs
- HtmlInputControl.cs
- WebPartsPersonalizationAuthorization.cs
- TdsParserStaticMethods.cs
- FrameworkContentElementAutomationPeer.cs
- Point.cs
- XamlSerializer.cs
- LogWriteRestartAreaState.cs
- XmlWhitespace.cs
- ExpressionBuilderContext.cs
- HyperLinkStyle.cs
- activationcontext.cs
- HtmlInputSubmit.cs
- PropertyConverter.cs
- AssemblyName.cs
- RegexParser.cs
- MediaElementAutomationPeer.cs
- MenuItem.cs