Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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. // //----------------------------------------------------------------------------- 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SoapSchemaExporter.cs
- SimpleWebHandlerParser.cs
- DataGridHelper.cs
- ConcurrentDictionary.cs
- ClickablePoint.cs
- PhotoPrintingIntent.cs
- XmlCDATASection.cs
- OpenTypeMethods.cs
- GCHandleCookieTable.cs
- TableSectionStyle.cs
- rsa.cs
- __ComObject.cs
- AutoCompleteStringCollection.cs
- CompositionTarget.cs
- TextRangeBase.cs
- FillBehavior.cs
- TabControlCancelEvent.cs
- SpecularMaterial.cs
- SettingsPropertyWrongTypeException.cs
- WindowsPen.cs
- TraceXPathNavigator.cs
- TypeConverterHelper.cs
- ClassicBorderDecorator.cs
- FormViewPageEventArgs.cs
- ProfileSettings.cs
- NotifyCollectionChangedEventArgs.cs
- DateTimePickerDesigner.cs
- MetafileHeaderWmf.cs
- ZipIORawDataFileBlock.cs
- TdsParserStaticMethods.cs
- XmlReaderSettings.cs
- SymmetricSecurityBindingElement.cs
- WasEndpointConfigContainer.cs
- ExpressionNode.cs
- CodeTypeDelegate.cs
- CompositeCollectionView.cs
- ServiceReference.cs
- EdmItemCollection.cs
- ActionFrame.cs
- ApplicationActivator.cs
- ViewGenResults.cs
- ToolStripPanelRow.cs
- RequestQueryParser.cs
- MobileListItem.cs
- DetailsViewRow.cs
- PageAsyncTask.cs
- LookupNode.cs
- GridViewHeaderRowPresenter.cs
- NativeMethods.cs
- NetworkInformationException.cs
- RSATokenProvider.cs
- HttpPostedFile.cs
- SortedDictionary.cs
- MediaTimeline.cs
- Formatter.cs
- TransformCollection.cs
- RC2CryptoServiceProvider.cs
- MessageRpc.cs
- GenericUriParser.cs
- TargetPerspective.cs
- OdbcDataAdapter.cs
- UIPermission.cs
- PropertyToken.cs
- HttpContext.cs
- XPathNode.cs
- SystemResources.cs
- QilValidationVisitor.cs
- ValidatorUtils.cs
- ResourceAssociationType.cs
- EntityViewGenerator.cs
- SQLDecimalStorage.cs
- WebPermission.cs
- Timer.cs
- MailWebEventProvider.cs
- SchemaNotation.cs
- HandlerBase.cs
- VirtualDirectoryMapping.cs
- DataRowCollection.cs
- DPCustomTypeDescriptor.cs
- GridViewUpdatedEventArgs.cs
- BamlLocalizer.cs
- UnsafeNativeMethods.cs
- WindowsPen.cs
- ActivityBindForm.Designer.cs
- DesignerCategoryAttribute.cs
- DesignerAdRotatorAdapter.cs
- XmlSchemaSimpleTypeUnion.cs
- DrawTreeNodeEventArgs.cs
- NameValueCollection.cs
- DateTimeValueSerializerContext.cs
- EUCJPEncoding.cs
- DataGridColumn.cs
- storepermission.cs
- LogExtentCollection.cs
- OverlappedAsyncResult.cs
- ByteStreamMessageUtility.cs
- EnumValidator.cs
- Empty.cs
- XmlSchemaSimpleTypeList.cs
- MultipartContentParser.cs