Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebParts / ConsumerConnectionPointCollection.cs / 1 / ConsumerConnectionPointCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ConsumerConnectionPointCollection : ReadOnlyCollectionBase { private HybridDictionary _ids; public ConsumerConnectionPointCollection() { } public ConsumerConnectionPointCollection(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"); } ConsumerConnectionPoint point = obj as ConsumerConnectionPoint; if (point == null) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "ConsumerConnectionPoint"), "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, "ConsumerConnectionPoint", id), "connectionPoints"); } } } public ConsumerConnectionPoint Default { get { return this[ConnectionPoint.DefaultID]; } } public ConsumerConnectionPoint this[int index] { get { return (ConsumerConnectionPoint)InnerList[index]; } } public ConsumerConnectionPoint this[string id] { get { return ((_ids != null) ? (ConsumerConnectionPoint)_ids[id] : null); } } public bool Contains(ConsumerConnectionPoint connectionPoint) { return InnerList.Contains(connectionPoint); } public int IndexOf(ConsumerConnectionPoint connectionPoint) { return InnerList.IndexOf(connectionPoint); } public void CopyTo(ConsumerConnectionPoint[] 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BufferedGraphicsContext.cs
- prefixendpointaddressmessagefilter.cs
- WindowsTooltip.cs
- DataColumnCollection.cs
- ComponentRenameEvent.cs
- VisualTarget.cs
- CodePropertyReferenceExpression.cs
- CrossAppDomainChannel.cs
- MarshalDirectiveException.cs
- SrgsElementFactory.cs
- KerberosReceiverSecurityToken.cs
- PeerName.cs
- securestring.cs
- LogicalExpressionTypeConverter.cs
- JoinQueryOperator.cs
- Relationship.cs
- RawContentTypeMapper.cs
- SspiSecurityTokenProvider.cs
- Transactions.cs
- FocusWithinProperty.cs
- HtmlTable.cs
- InstallHelper.cs
- ConfigXmlDocument.cs
- Label.cs
- Control.cs
- TreePrinter.cs
- PageCatalogPartDesigner.cs
- DataList.cs
- UIServiceHelper.cs
- TraceFilter.cs
- OracleColumn.cs
- XomlCompilerHelpers.cs
- MessageQueuePermissionEntry.cs
- SqlDependencyListener.cs
- Delegate.cs
- ExpressionHelper.cs
- Maps.cs
- StateMachine.cs
- XmlSchemaSimpleContentExtension.cs
- CodeCompileUnit.cs
- Point3DCollection.cs
- mediaclock.cs
- ToolBarTray.cs
- CqlIdentifiers.cs
- DataGridViewCell.cs
- wgx_sdk_version.cs
- RegistryKey.cs
- ListBoxItem.cs
- TemplateControlParser.cs
- DmlSqlGenerator.cs
- DPTypeDescriptorContext.cs
- MetabaseReader.cs
- ProgressBarBrushConverter.cs
- WorkflowServiceHostFactory.cs
- MeasurementDCInfo.cs
- TextSelectionProcessor.cs
- MissingFieldException.cs
- SpanIndex.cs
- SafeCertificateStore.cs
- CodeDefaultValueExpression.cs
- RemotingException.cs
- TaskFactory.cs
- AspNetSynchronizationContext.cs
- GenerateHelper.cs
- TextBoxView.cs
- DelimitedListTraceListener.cs
- CodeObjectCreateExpression.cs
- CapacityStreamGeometryContext.cs
- PointAnimationUsingPath.cs
- SafeArrayTypeMismatchException.cs
- CustomTypeDescriptor.cs
- storepermission.cs
- HttpListener.cs
- MetadataItemEmitter.cs
- TimeEnumHelper.cs
- SimpleApplicationHost.cs
- SafeFileHandle.cs
- ReadWriteSpinLock.cs
- DefaultEventAttribute.cs
- DataGridBeginningEditEventArgs.cs
- ContactManager.cs
- _AutoWebProxyScriptWrapper.cs
- RoleService.cs
- TimelineClockCollection.cs
- SqlFunctionAttribute.cs
- ComponentEvent.cs
- Crypto.cs
- AbstractDataSvcMapFileLoader.cs
- DataSourceSelectArguments.cs
- Decimal.cs
- OdbcEnvironmentHandle.cs
- SmtpTransport.cs
- SourceElementsCollection.cs
- ProfileGroupSettingsCollection.cs
- CommonDialog.cs
- AutoSizeComboBox.cs
- DataGridCommandEventArgs.cs
- WebPartZoneCollection.cs
- RenderCapability.cs
- RegisterResponseInfo.cs