Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- dataSvcMapFileLoader.cs
- CommonDialog.cs
- DriveInfo.cs
- SchemaElementDecl.cs
- CookielessHelper.cs
- UInt16Storage.cs
- ReachPageContentSerializerAsync.cs
- ImageSourceValueSerializer.cs
- PagesChangedEventArgs.cs
- PlaceHolder.cs
- AssociationEndMember.cs
- LinkedList.cs
- SqlDataSourceDesigner.cs
- ProcessInfo.cs
- OracleLob.cs
- AsyncSerializedWorker.cs
- ToolStripArrowRenderEventArgs.cs
- XmlValueConverter.cs
- Visitors.cs
- ImageCodecInfo.cs
- WindowsRichEditRange.cs
- AutomationPeer.cs
- ComponentResourceKey.cs
- CompiledAction.cs
- TextView.cs
- TimeSpanParse.cs
- PhysicalFontFamily.cs
- DesignerDeviceConfig.cs
- FormViewDeletedEventArgs.cs
- ThreadAbortException.cs
- DataGridViewRowStateChangedEventArgs.cs
- TextBoxBase.cs
- DynamicPropertyHolder.cs
- ConcurrentBag.cs
- PropertyConverter.cs
- ExpressionPrinter.cs
- PreservationFileReader.cs
- FlowLayoutSettings.cs
- SqlServer2KCompatibilityAnnotation.cs
- NullableConverter.cs
- RequestCachePolicy.cs
- PolicyChain.cs
- Condition.cs
- QilTypeChecker.cs
- PeerTransportListenAddressValidator.cs
- XamlGridLengthSerializer.cs
- DynamicRendererThreadManager.cs
- Mappings.cs
- MasterPageBuildProvider.cs
- DeadCharTextComposition.cs
- TabRenderer.cs
- ExpressionConverter.cs
- FixedTextView.cs
- Root.cs
- DictionaryChange.cs
- DataGridPageChangedEventArgs.cs
- RoleService.cs
- Image.cs
- SqlRetyper.cs
- SoapEnumAttribute.cs
- ContextMenuService.cs
- Int32.cs
- XmlWriterSettings.cs
- OleDbSchemaGuid.cs
- LassoHelper.cs
- Schema.cs
- ConfigurationErrorsException.cs
- ProtocolElement.cs
- DesignDataSource.cs
- TypeBuilderInstantiation.cs
- X500Name.cs
- TreeNodeBindingCollection.cs
- NonVisualControlAttribute.cs
- CellRelation.cs
- CacheEntry.cs
- CmsInterop.cs
- ConfigXmlElement.cs
- UserControl.cs
- UnsafeNativeMethods.cs
- ResXResourceWriter.cs
- ConfigurationSchemaErrors.cs
- HwndHostAutomationPeer.cs
- FileDialog.cs
- WorkflowFileItem.cs
- MetadataItem_Static.cs
- ConfigurationLocation.cs
- FormViewInsertEventArgs.cs
- LinqExpressionNormalizer.cs
- DateTimeStorage.cs
- NullableBoolConverter.cs
- ResourceContainer.cs
- ModelPropertyImpl.cs
- BehaviorEditorPart.cs
- ColumnTypeConverter.cs
- UnitySerializationHolder.cs
- MetafileHeader.cs
- ElementMarkupObject.cs
- CodeBlockBuilder.cs
- EventsTab.cs
- ObjectContextServiceProvider.cs