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
- DocumentGrid.cs
- propertytag.cs
- MatrixConverter.cs
- TreeNodeCollection.cs
- TranslateTransform3D.cs
- DataGridViewIntLinkedList.cs
- FrugalMap.cs
- IndexedString.cs
- ExpressionPrefixAttribute.cs
- SByteStorage.cs
- Stack.cs
- XmlJsonReader.cs
- XhtmlConformanceSection.cs
- ByteConverter.cs
- SessionStateSection.cs
- QueryableFilterRepeater.cs
- UInt16.cs
- MessageSecurityException.cs
- PersonalizationStateQuery.cs
- BulletChrome.cs
- ParameterToken.cs
- FrameworkElement.cs
- ParallelTimeline.cs
- SqlDataSourceView.cs
- SqlDataSourceTableQuery.cs
- CheckBox.cs
- MultipleViewPattern.cs
- DataRecordInternal.cs
- WebResponse.cs
- WriteStateInfoBase.cs
- ScrollEvent.cs
- DtcInterfaces.cs
- UriTemplateEquivalenceComparer.cs
- CompleteWizardStep.cs
- DataGridViewColumnConverter.cs
- ZipFileInfo.cs
- XmlSchemaAttributeGroup.cs
- ValueConversionAttribute.cs
- RegistrySecurity.cs
- OdbcHandle.cs
- XamlFilter.cs
- WpfKnownMember.cs
- QueryOperatorEnumerator.cs
- XmlSchemaSimpleContentExtension.cs
- RemotingService.cs
- GroupDescription.cs
- DashStyle.cs
- _KerberosClient.cs
- TableLayoutRowStyleCollection.cs
- UTF7Encoding.cs
- DataIdProcessor.cs
- NullExtension.cs
- DBNull.cs
- MessageDecoder.cs
- RawStylusActions.cs
- BackStopAuthenticationModule.cs
- MetadataCollection.cs
- ValueChangedEventManager.cs
- LongValidatorAttribute.cs
- Help.cs
- XmlSerializerVersionAttribute.cs
- EntryWrittenEventArgs.cs
- SecureConversationVersion.cs
- QilName.cs
- XsltArgumentList.cs
- DataServiceQueryProvider.cs
- WebPartConnectionsConnectVerb.cs
- HashAlgorithm.cs
- BinHexEncoder.cs
- MultiAsyncResult.cs
- ResourcePool.cs
- SignedPkcs7.cs
- InternalBufferOverflowException.cs
- WindowsIPAddress.cs
- GlyphElement.cs
- IListConverters.cs
- BaseDataListComponentEditor.cs
- ArrangedElementCollection.cs
- SpellerError.cs
- DesignerAttribute.cs
- BindingEntityInfo.cs
- DataSvcMapFileSerializer.cs
- SQLInt32Storage.cs
- GetResponse.cs
- SizeLimitedCache.cs
- While.cs
- HttpChannelHelper.cs
- LoadMessageLogger.cs
- _NegotiateClient.cs
- CacheChildrenQuery.cs
- _IPv6Address.cs
- SettingsBindableAttribute.cs
- _SslState.cs
- PanelStyle.cs
- SqlTopReducer.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- FontWeightConverter.cs
- InstalledFontCollection.cs
- SqlCacheDependency.cs
- SimpleApplicationHost.cs