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
- XmlNavigatorStack.cs
- ControlParameter.cs
- PeerNearMe.cs
- webeventbuffer.cs
- DateTimeConverter.cs
- EpmCustomContentWriterNodeData.cs
- EdmProviderManifest.cs
- WebServiceMethodData.cs
- NullPackagingPolicy.cs
- CompositeActivityValidator.cs
- KeyPullup.cs
- FontStretches.cs
- _Events.cs
- CalendarTable.cs
- MDIControlStrip.cs
- EncodingTable.cs
- cookie.cs
- ExtensionElementCollection.cs
- VisualStyleTypesAndProperties.cs
- AssemblyCollection.cs
- StagingAreaInputItem.cs
- iisPickupDirectory.cs
- SQLInt16.cs
- _BufferOffsetSize.cs
- QilReplaceVisitor.cs
- SerializationEventsCache.cs
- PageHandlerFactory.cs
- UpDownEvent.cs
- KeysConverter.cs
- SplineKeyFrames.cs
- XmlTextAttribute.cs
- Parser.cs
- SQLInt16Storage.cs
- DataGridDetailsPresenter.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ReadOnlyState.cs
- Propagator.JoinPropagator.cs
- TextRunProperties.cs
- ExpandSegment.cs
- ResolveRequestResponseAsyncResult.cs
- TailPinnedEventArgs.cs
- KeyedPriorityQueue.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- StringValueSerializer.cs
- Visual3D.cs
- MembershipPasswordException.cs
- MailSettingsSection.cs
- RelatedPropertyManager.cs
- InternalControlCollection.cs
- XPathAncestorIterator.cs
- CardSpacePolicyElement.cs
- GlyphingCache.cs
- HttpProfileGroupBase.cs
- KeyPullup.cs
- ScriptIgnoreAttribute.cs
- PrtCap_Reader.cs
- PropertyHelper.cs
- ByteFacetDescriptionElement.cs
- UICuesEvent.cs
- SingleSelectRootGridEntry.cs
- TransformCollection.cs
- ProfilePropertySettingsCollection.cs
- Decorator.cs
- ConfigXmlElement.cs
- IntSecurity.cs
- QueryCacheKey.cs
- ExtensionSimplifierMarkupObject.cs
- contentDescriptor.cs
- IndependentAnimationStorage.cs
- ButtonChrome.cs
- Timer.cs
- Soap12ProtocolImporter.cs
- StaticResourceExtension.cs
- UntrustedRecipientException.cs
- JsonReader.cs
- BamlTreeNode.cs
- XmlQueryStaticData.cs
- SynchronizationContext.cs
- FirstMatchCodeGroup.cs
- Menu.cs
- Form.cs
- MenuCommand.cs
- StopStoryboard.cs
- HwndSourceKeyboardInputSite.cs
- HttpCookieCollection.cs
- BoolExpressionVisitors.cs
- RelatedView.cs
- GetWinFXPath.cs
- MatchAttribute.cs
- DbParameterHelper.cs
- HtmlProps.cs
- AutoResetEvent.cs
- Drawing.cs
- NotificationContext.cs
- SchemaImporter.cs
- PropertyInformation.cs
- BaseInfoTable.cs
- BitmapPalettes.cs
- Validator.cs
- Group.cs