Code:
/ 4.0 / 4.0 / 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. //------------------------------------------------------------------------------ //// 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
- CodeRegionDirective.cs
- HttpResponseWrapper.cs
- ScheduleChanges.cs
- Int32RectConverter.cs
- TdsRecordBufferSetter.cs
- RegexTree.cs
- DispatchChannelSink.cs
- SizeAnimationClockResource.cs
- EmbeddedMailObjectsCollection.cs
- DPTypeDescriptorContext.cs
- SapiGrammar.cs
- TemplateNameScope.cs
- UnsafeNativeMethods.cs
- ItemsPanelTemplate.cs
- CompilationRelaxations.cs
- FixedSOMTextRun.cs
- Expression.cs
- XmlException.cs
- SafeTimerHandle.cs
- PropertyItemInternal.cs
- SemanticResolver.cs
- SectionInformation.cs
- ToolZoneDesigner.cs
- TextTreeTextBlock.cs
- ImageSourceTypeConverter.cs
- InkCanvasSelectionAdorner.cs
- IndentedTextWriter.cs
- LinkUtilities.cs
- CellCreator.cs
- Point.cs
- FactoryId.cs
- GlyphCache.cs
- BitmapEffect.cs
- ProfileParameter.cs
- SetterBaseCollection.cs
- TreeNodeCollectionEditorDialog.cs
- _Semaphore.cs
- StateMachineHelpers.cs
- SplitterCancelEvent.cs
- HttpWebResponse.cs
- BigInt.cs
- ByteAnimationUsingKeyFrames.cs
- CryptoKeySecurity.cs
- SchemaElementDecl.cs
- SplashScreenNativeMethods.cs
- SecurityContext.cs
- AttachedPropertyBrowsableAttribute.cs
- NullNotAllowedCollection.cs
- EventsTab.cs
- ElementNotEnabledException.cs
- WebPartVerb.cs
- SoapObjectWriter.cs
- ListViewTableRow.cs
- XPathNodePointer.cs
- TripleDES.cs
- DiscoveryDocumentReference.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- NameTable.cs
- Variant.cs
- TransactionScopeDesigner.cs
- PrintPreviewControl.cs
- NameValueFileSectionHandler.cs
- WinFormsSpinner.cs
- Queue.cs
- GenericTypeParameterBuilder.cs
- IntegerFacetDescriptionElement.cs
- DrawingVisual.cs
- ApplicationSecurityManager.cs
- ResourceSet.cs
- ScalarType.cs
- ParsedRoute.cs
- BufferedReceiveManager.cs
- MessageQueuePermission.cs
- QuadraticBezierSegment.cs
- UserNameSecurityTokenProvider.cs
- Accessible.cs
- PropertyKey.cs
- UnmanagedMemoryStreamWrapper.cs
- MenuBase.cs
- FillRuleValidation.cs
- QilStrConcatenator.cs
- DataService.cs
- EventSinkHelperWriter.cs
- SystemTcpConnection.cs
- TableProviderWrapper.cs
- EntityConnectionStringBuilder.cs
- ScriptingRoleServiceSection.cs
- WorkflowRuntimeBehavior.cs
- CalloutQueueItem.cs
- StreamReader.cs
- ObjectViewQueryResultData.cs
- XmlQueryCardinality.cs
- FontCacheUtil.cs
- ReadOnlyDictionary.cs
- DataServiceExpressionVisitor.cs
- InputScope.cs
- FlowPanelDesigner.cs
- DoubleCollection.cs
- IDataContractSurrogate.cs
- SynchronizingStream.cs