Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / 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. //------------------------------------------------------------------------------ //// 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
- SecurityCriticalDataForSet.cs
- ProviderMetadata.cs
- SignedXml.cs
- ObjectMemberMapping.cs
- ProcessHostConfigUtils.cs
- EventLogger.cs
- CmsInterop.cs
- RowSpanVector.cs
- DuplexClientBase.cs
- FormsAuthenticationCredentials.cs
- QueryableFilterUserControl.cs
- WebDisplayNameAttribute.cs
- ThicknessAnimationBase.cs
- ZipFileInfoCollection.cs
- SqlInfoMessageEvent.cs
- TypeInfo.cs
- HandleCollector.cs
- Int32Rect.cs
- ConfigXmlComment.cs
- FieldBuilder.cs
- RequestDescription.cs
- EntityDataSourceColumn.cs
- UseAttributeSetsAction.cs
- NodeLabelEditEvent.cs
- ThreadAttributes.cs
- XmlSchemaSet.cs
- Catch.cs
- COSERVERINFO.cs
- WebPartConnectionsCancelVerb.cs
- SerializerDescriptor.cs
- GlobalItem.cs
- sortedlist.cs
- WindowsMenu.cs
- WindowClosedEventArgs.cs
- WebPartEditorOkVerb.cs
- ProviderIncompatibleException.cs
- DataGridViewRowsAddedEventArgs.cs
- ParameterModifier.cs
- BaseTemplateParser.cs
- coordinatorscratchpad.cs
- DataSourceIDConverter.cs
- FontStretchConverter.cs
- TimeSpanOrInfiniteValidator.cs
- StatusCommandUI.cs
- TimeoutException.cs
- COM2ExtendedUITypeEditor.cs
- DragCompletedEventArgs.cs
- SqlUserDefinedTypeAttribute.cs
- XmlILOptimizerVisitor.cs
- XmlSchemaSearchPattern.cs
- AdornerLayer.cs
- StringCollection.cs
- ScalarConstant.cs
- CompatibleComparer.cs
- SoapSchemaImporter.cs
- URL.cs
- ImmutableAssemblyCacheEntry.cs
- HttpException.cs
- Delegate.cs
- SpanIndex.cs
- WebBaseEventKeyComparer.cs
- NativeMsmqMessage.cs
- HttpCacheVary.cs
- FullTextBreakpoint.cs
- LoginUtil.cs
- ContractBase.cs
- HotSpotCollection.cs
- MenuItemBindingCollection.cs
- NotifyInputEventArgs.cs
- DesignOnlyAttribute.cs
- WpfWebRequestHelper.cs
- SubpageParagraph.cs
- SplineQuaternionKeyFrame.cs
- MeasureItemEvent.cs
- Unit.cs
- HtmlGenericControl.cs
- Decoder.cs
- Label.cs
- RecordBuilder.cs
- Application.cs
- DES.cs
- Attributes.cs
- XmlEventCache.cs
- X509SecurityToken.cs
- SyndicationLink.cs
- JoinCqlBlock.cs
- BindingNavigator.cs
- activationcontext.cs
- mactripleDES.cs
- PathFigure.cs
- Pen.cs
- UrlAuthFailureHandler.cs
- LinkedList.cs
- HeaderPanel.cs
- UnionExpr.cs
- AsyncOperation.cs
- UpdatePanel.cs
- CriticalHandle.cs
- TextEditorLists.cs
- LayoutEditorPart.cs