Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerDataRelationship.cs
- EventToken.cs
- DataGridViewColumnTypeEditor.cs
- CharAnimationUsingKeyFrames.cs
- ConditionalWeakTable.cs
- RegexRunnerFactory.cs
- DataGridViewCellStyleConverter.cs
- Helper.cs
- BitmapSizeOptions.cs
- PropertyGridEditorPart.cs
- RSACryptoServiceProvider.cs
- EventArgs.cs
- TypeBuilder.cs
- RefreshResponseInfo.cs
- CollectionType.cs
- Section.cs
- RichTextBox.cs
- Cursor.cs
- ColorConverter.cs
- DataColumnCollection.cs
- ExtensionWindowResizeGrip.cs
- Int32RectConverter.cs
- DispatchWrapper.cs
- ServiceReference.cs
- ShaderEffect.cs
- VBIdentifierName.cs
- SendActivity.cs
- ListViewCancelEventArgs.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- HttpRequestTraceRecord.cs
- RegexCharClass.cs
- ListItemCollection.cs
- FileNotFoundException.cs
- ListControl.cs
- ContentPlaceHolder.cs
- DataGridViewCellFormattingEventArgs.cs
- UnsafeNativeMethods.cs
- OleDbRowUpdatedEvent.cs
- TrackingServices.cs
- Regex.cs
- CodeTypeDeclarationCollection.cs
- XmlFormatExtensionAttribute.cs
- DataGridViewCheckBoxColumn.cs
- EventlogProvider.cs
- DocumentSchemaValidator.cs
- CredentialCache.cs
- AsyncOperation.cs
- ScalarOps.cs
- SynchronizationLockException.cs
- ChtmlPhoneCallAdapter.cs
- counter.cs
- relpropertyhelper.cs
- WebAdminConfigurationHelper.cs
- StringDictionaryWithComparer.cs
- DisplayInformation.cs
- Screen.cs
- TextPointer.cs
- DiagnosticTraceRecords.cs
- TreeNodeEventArgs.cs
- UriTemplateClientFormatter.cs
- IndexedGlyphRun.cs
- BridgeDataRecord.cs
- InternalControlCollection.cs
- ToolStripDesignerAvailabilityAttribute.cs
- RemoteHelper.cs
- Event.cs
- ObjectSerializerFactory.cs
- SqlServer2KCompatibilityAnnotation.cs
- TabControl.cs
- UrlMappingsSection.cs
- WindowClosedEventArgs.cs
- FlowDocument.cs
- Rotation3DKeyFrameCollection.cs
- TransformerConfigurationWizardBase.cs
- SystemColors.cs
- DeploymentSection.cs
- SessionParameter.cs
- activationcontext.cs
- SkinIDTypeConverter.cs
- InheritedPropertyChangedEventArgs.cs
- _StreamFramer.cs
- DesignerObjectListAdapter.cs
- SiteMapNodeItemEventArgs.cs
- EventEntry.cs
- EasingFunctionBase.cs
- XamlTreeBuilderBamlRecordWriter.cs
- GAC.cs
- PerfCounterSection.cs
- CqlParser.cs
- CodeTypeConstructor.cs
- FtpWebRequest.cs
- CodeTypeReferenceSerializer.cs
- DbProviderManifest.cs
- SafeEventLogWriteHandle.cs
- CollaborationHelperFunctions.cs
- BindingNavigator.cs
- PointLight.cs
- CompilationUnit.cs
- ServiceDescription.cs
- KeyInstance.cs