Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ProviderConnectionPointCollection.cs / 1305376 / 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;
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InfoCardService.cs
- Int16Storage.cs
- QueryCacheManager.cs
- FolderBrowserDialogDesigner.cs
- Image.cs
- ImageAutomationPeer.cs
- Object.cs
- HtmlForm.cs
- StylusOverProperty.cs
- SizeIndependentAnimationStorage.cs
- XamlLoadErrorInfo.cs
- StorageInfo.cs
- RepeatInfo.cs
- SchemaElement.cs
- QueuePathDialog.cs
- SerialStream.cs
- XmlParser.cs
- ConfigurationSection.cs
- Matrix.cs
- RenderTargetBitmap.cs
- SnapshotChangeTrackingStrategy.cs
- UIElementParaClient.cs
- WaitHandle.cs
- GenericTypeParameterBuilder.cs
- InlineObject.cs
- TaskFormBase.cs
- CacheDependency.cs
- DirectionalAction.cs
- Soap12ServerProtocol.cs
- Renderer.cs
- ClientType.cs
- ProjectionAnalyzer.cs
- SHA256.cs
- AddInPipelineAttributes.cs
- FlagsAttribute.cs
- SingletonConnectionReader.cs
- _RequestCacheProtocol.cs
- SafeCryptoHandles.cs
- StructuredTypeEmitter.cs
- Vector3DAnimation.cs
- EnumerableRowCollectionExtensions.cs
- WindowsComboBox.cs
- TeredoHelper.cs
- ToolZone.cs
- KeyToListMap.cs
- CalendarAutoFormat.cs
- Stroke2.cs
- VisualTreeHelper.cs
- PerformanceCounterPermissionEntry.cs
- DataGridViewRowCollection.cs
- ErrorHandler.cs
- ObjectSpanRewriter.cs
- DataGridViewComboBoxColumn.cs
- TreeViewAutomationPeer.cs
- EnumValidator.cs
- RightNameExpirationInfoPair.cs
- BasicHttpSecurity.cs
- RSAPKCS1SignatureFormatter.cs
- ButtonPopupAdapter.cs
- SQLInt32Storage.cs
- ProfileSettings.cs
- XamlPoint3DCollectionSerializer.cs
- CaseDesigner.xaml.cs
- SignatureResourcePool.cs
- PolyLineSegmentFigureLogic.cs
- RuntimeWrappedException.cs
- ByteStorage.cs
- SendActivityDesigner.cs
- TdsParserSafeHandles.cs
- EntityCollectionChangedParams.cs
- FacetValueContainer.cs
- ResourcesBuildProvider.cs
- GPStream.cs
- Vector.cs
- ButtonChrome.cs
- DataComponentGenerator.cs
- ComponentEditorPage.cs
- DesignSurfaceEvent.cs
- FormCollection.cs
- AsyncOperation.cs
- Resources.Designer.cs
- TextControlDesigner.cs
- GlobalProxySelection.cs
- BuilderInfo.cs
- TextEmbeddedObject.cs
- BindingValueChangedEventArgs.cs
- MetaDataInfo.cs
- StringBlob.cs
- ResolveDuplexCD1AsyncResult.cs
- NamespaceEmitter.cs
- UserNameSecurityToken.cs
- HttpHandlersSection.cs
- WindowsListViewItemCheckBox.cs
- PixelFormats.cs
- DataContractSet.cs
- DoubleIndependentAnimationStorage.cs
- InputMethod.cs
- PersistNameAttribute.cs
- TitleStyle.cs
- SecurityDescriptor.cs