Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConsumerConnectionPointCollection.cs / 1305376 / ConsumerConnectionPointCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System.Collections; using System.Collections.Specialized; using System.Globalization; public sealed class ConsumerConnectionPointCollection : ReadOnlyCollectionBase { private HybridDictionary _ids; public ConsumerConnectionPointCollection() { } public ConsumerConnectionPointCollection(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"); } ConsumerConnectionPoint point = obj as ConsumerConnectionPoint; if (point == null) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "ConsumerConnectionPoint"), "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, "ConsumerConnectionPoint", id), "connectionPoints"); } } } public ConsumerConnectionPoint Default { get { return this[ConnectionPoint.DefaultID]; } } public ConsumerConnectionPoint this[int index] { get { return (ConsumerConnectionPoint)InnerList[index]; } } public ConsumerConnectionPoint this[string id] { get { return ((_ids != null) ? (ConsumerConnectionPoint)_ids[id] : null); } } public bool Contains(ConsumerConnectionPoint connectionPoint) { return InnerList.Contains(connectionPoint); } public int IndexOf(ConsumerConnectionPoint connectionPoint) { return InnerList.IndexOf(connectionPoint); } public void CopyTo(ConsumerConnectionPoint[] 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
- XmlArrayItemAttribute.cs
- CompositeCollection.cs
- NetworkInformationException.cs
- ProgressChangedEventArgs.cs
- shaper.cs
- ReliableMessagingHelpers.cs
- IProvider.cs
- PeerNearMe.cs
- ImpersonationContext.cs
- WSFederationHttpBindingCollectionElement.cs
- SwitchElementsCollection.cs
- CompilerParameters.cs
- DocumentViewerConstants.cs
- ToolStripDropTargetManager.cs
- ConnectionPointGlyph.cs
- TableAutomationPeer.cs
- UserControlDesigner.cs
- RoutedEvent.cs
- TextTreeFixupNode.cs
- DependencyObjectType.cs
- AvTraceDetails.cs
- MultiAsyncResult.cs
- MenuRendererClassic.cs
- TextEditorTables.cs
- BasicKeyConstraint.cs
- RegionIterator.cs
- ConnectionConsumerAttribute.cs
- RangeValidator.cs
- InputScopeAttribute.cs
- DataGridItem.cs
- IntSecurity.cs
- SqlCaseSimplifier.cs
- Message.cs
- StylusCaptureWithinProperty.cs
- BooleanProjectedSlot.cs
- PointUtil.cs
- SQLSingleStorage.cs
- ResourceDescriptionAttribute.cs
- ClientScriptManagerWrapper.cs
- Span.cs
- DataObjectEventArgs.cs
- SqlMethodTransformer.cs
- XmlnsPrefixAttribute.cs
- DataGridCellInfo.cs
- VoiceObjectToken.cs
- HtmlInputPassword.cs
- DbMetaDataColumnNames.cs
- RectIndependentAnimationStorage.cs
- ContractSearchPattern.cs
- GridItemProviderWrapper.cs
- basenumberconverter.cs
- WebPartConnectionCollection.cs
- XmlDataSourceNodeDescriptor.cs
- QilList.cs
- ContentPropertyAttribute.cs
- WebServiceMethodData.cs
- PersistenceContextEnlistment.cs
- WindowsTokenRoleProvider.cs
- DBParameter.cs
- MessageBox.cs
- CollectionViewGroup.cs
- DataTableReaderListener.cs
- TaskbarItemInfo.cs
- ResXBuildProvider.cs
- ADMembershipProvider.cs
- XmlName.cs
- SafeNativeMethods.cs
- UriTemplateMatch.cs
- PointAnimationBase.cs
- TextPointerBase.cs
- JsonSerializer.cs
- ServiceBehaviorAttribute.cs
- EncodingTable.cs
- DemultiplexingClientMessageFormatter.cs
- ProcessModelSection.cs
- JournalNavigationScope.cs
- CommandField.cs
- CheckableControlBaseAdapter.cs
- DataGridCell.cs
- DrawingContextDrawingContextWalker.cs
- HorizontalAlignConverter.cs
- PageRanges.cs
- MatrixCamera.cs
- WebCategoryAttribute.cs
- PermissionToken.cs
- AddingNewEventArgs.cs
- ArrayElementGridEntry.cs
- CreateUserWizardStep.cs
- FactoryId.cs
- FixedSOMContainer.cs
- HtmlTextViewAdapter.cs
- AvTraceFormat.cs
- PeerApplicationLaunchInfo.cs
- WebPermission.cs
- TextBoxView.cs
- CustomAssemblyResolver.cs
- RelatedPropertyManager.cs
- EntityDataSourceWrapperPropertyDescriptor.cs
- CaretElement.cs
- ImageMap.cs