Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionInterfaceCollection.cs / 1 / ConnectionInterfaceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.ComponentModel; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class ConnectionInterfaceCollection : ReadOnlyCollectionBase { public static readonly ConnectionInterfaceCollection Empty = new ConnectionInterfaceCollection(); public ConnectionInterfaceCollection() { } public ConnectionInterfaceCollection(ICollection connectionInterfaces) { Initialize(null, connectionInterfaces); } public ConnectionInterfaceCollection(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { Initialize(existingConnectionInterfaces, connectionInterfaces); } private void Initialize(ConnectionInterfaceCollection existingConnectionInterfaces, ICollection connectionInterfaces) { if (existingConnectionInterfaces != null) { foreach (Type existingConnectionInterface in existingConnectionInterfaces) { // Don't need to check arg, since we know it is valid since it came // from a ConnectionInterfaceCollection. InnerList.Add(existingConnectionInterface); } } if (connectionInterfaces != null) { foreach (object obj in connectionInterfaces) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "connectionInterfaces"); } if (!(obj is Type)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "Type"), "connectionInterfaces"); } InnerList.Add(obj); } } } public bool Contains(Type value) { return InnerList.Contains(value); } public int IndexOf(Type value) { return InnerList.IndexOf(value); } public Type this[int index] { get { return (Type)InnerList[index]; } } public void CopyTo(Type[] array, int index) { InnerList.CopyTo(array, index); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WeakReferenceEnumerator.cs
- SubpageParaClient.cs
- XmlCodeExporter.cs
- ToolStripDesignerAvailabilityAttribute.cs
- SqlClientFactory.cs
- CompilerScopeManager.cs
- UriTemplatePathPartiallyEquivalentSet.cs
- WebPartConnectionsCloseVerb.cs
- ClosureBinding.cs
- AssemblyUtil.cs
- Stream.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ScrollChrome.cs
- InputLanguageSource.cs
- TextBoxAutomationPeer.cs
- ResourceDisplayNameAttribute.cs
- TemplateInstanceAttribute.cs
- odbcmetadatacollectionnames.cs
- OLEDB_Enum.cs
- UserControl.cs
- SHA1.cs
- AssociationTypeEmitter.cs
- SoapTypeAttribute.cs
- DesigntimeLicenseContext.cs
- GorillaCodec.cs
- DataBinder.cs
- NetSectionGroup.cs
- BaseDataListComponentEditor.cs
- HijriCalendar.cs
- StreamGeometry.cs
- RegionIterator.cs
- SqlCommand.cs
- FontUnit.cs
- DelimitedListTraceListener.cs
- Roles.cs
- PeerConnector.cs
- ExpandedProjectionNode.cs
- CodeCastExpression.cs
- FillErrorEventArgs.cs
- ButtonChrome.cs
- SamlAuthenticationStatement.cs
- StateValidator.cs
- DataGridViewTextBoxCell.cs
- TransformerInfo.cs
- FrugalList.cs
- RSAPKCS1SignatureDeformatter.cs
- ClientSettings.cs
- ErrorStyle.cs
- ConfigsHelper.cs
- GridSplitter.cs
- CuspData.cs
- DesignerSerializationManager.cs
- DbDataReader.cs
- PersonalizationAdministration.cs
- DesignRelation.cs
- XmlEncoding.cs
- TemplatedControlDesigner.cs
- TemplateParser.cs
- HttpResponse.cs
- DbInsertCommandTree.cs
- X509ScopedServiceCertificateElement.cs
- WorkflowItemsPresenter.cs
- ContainerParaClient.cs
- XPathNodeHelper.cs
- MultipleViewPattern.cs
- XmlText.cs
- DataBoundLiteralControl.cs
- IndexedString.cs
- DeviceContexts.cs
- SizeAnimationUsingKeyFrames.cs
- LineSegment.cs
- Condition.cs
- BamlBinaryWriter.cs
- EntityDataSourceSelectedEventArgs.cs
- LocatorPart.cs
- HexParser.cs
- AvTraceFormat.cs
- Base64Encoder.cs
- BitmapData.cs
- DataReaderContainer.cs
- TaskFormBase.cs
- CheckBoxBaseAdapter.cs
- RtfToken.cs
- SocketPermission.cs
- KeyValuePair.cs
- WebPartConnectVerb.cs
- IPipelineRuntime.cs
- StringValidator.cs
- HtmlInputCheckBox.cs
- XmlNamespaceMapping.cs
- MenuCommands.cs
- ErrorFormatterPage.cs
- ConvertEvent.cs
- validationstate.cs
- Geometry3D.cs
- PreviewControlDesigner.cs
- TargetParameterCountException.cs
- OletxEnlistment.cs
- StringFormat.cs
- X509RawDataKeyIdentifierClause.cs