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
- MachineKeyConverter.cs
- mactripleDES.cs
- DecoderBestFitFallback.cs
- NonParentingControl.cs
- Crc32.cs
- NativeActivityContext.cs
- CapabilitiesState.cs
- AtomParser.cs
- TextEditorTyping.cs
- UnsafeNativeMethods.cs
- Compensation.cs
- ShaderEffect.cs
- SqlVisitor.cs
- NativeMethods.cs
- ParseHttpDate.cs
- ByteAnimation.cs
- EntityUtil.cs
- TreeNodeStyleCollection.cs
- ResizeGrip.cs
- OfTypeExpression.cs
- WpfSharedXamlSchemaContext.cs
- LocatorGroup.cs
- CannotUnloadAppDomainException.cs
- BaseDataListPage.cs
- DataViewManagerListItemTypeDescriptor.cs
- CustomValidator.cs
- SelectedPathEditor.cs
- MILUtilities.cs
- NamespaceQuery.cs
- Table.cs
- CompositionAdorner.cs
- MultiSelector.cs
- ISessionStateStore.cs
- ModelItemDictionaryImpl.cs
- StreamWithDictionary.cs
- PermissionListSet.cs
- SrgsElement.cs
- WinEventHandler.cs
- FormView.cs
- ContentValidator.cs
- Int16Converter.cs
- CompositeTypefaceMetrics.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SafeMILHandle.cs
- UrlRoutingHandler.cs
- AffineTransform3D.cs
- DataGridViewCellStyleConverter.cs
- ProtocolViolationException.cs
- EventDescriptor.cs
- Bitmap.cs
- EventDescriptor.cs
- DataControlLinkButton.cs
- FormViewInsertedEventArgs.cs
- Transform.cs
- HtmlTernaryTree.cs
- MenuItemStyleCollection.cs
- XmlSchemaValidationException.cs
- HostAdapter.cs
- MemoryFailPoint.cs
- BufferAllocator.cs
- ChangeToolStripParentVerb.cs
- ProxyWebPartManagerDesigner.cs
- AdornerDecorator.cs
- recordstatescratchpad.cs
- IOThreadTimer.cs
- EventListenerClientSide.cs
- GroupPartitionExpr.cs
- Transform3DGroup.cs
- Inline.cs
- SourceFileBuildProvider.cs
- X509CertificateInitiatorClientCredential.cs
- RegistryDataKey.cs
- Rights.cs
- DecimalConstantAttribute.cs
- FixedTextView.cs
- TextUtf8RawTextWriter.cs
- SoapExtensionStream.cs
- CngKeyBlobFormat.cs
- LinkButton.cs
- DeferredTextReference.cs
- PassportAuthentication.cs
- GradientSpreadMethodValidation.cs
- VirtualDirectoryMappingCollection.cs
- EmptyWorkItem.cs
- StrokeCollectionConverter.cs
- RawStylusInputCustomDataList.cs
- ToolStripMenuItem.cs
- HostSecurityManager.cs
- NodeLabelEditEvent.cs
- CodeMethodInvokeExpression.cs
- ClassicBorderDecorator.cs
- NotifyIcon.cs
- BooleanFunctions.cs
- FontUnit.cs
- isolationinterop.cs
- ColorContext.cs
- SmtpReplyReaderFactory.cs
- _FtpDataStream.cs
- XmlSchemaDocumentation.cs
- ObjectStorage.cs