Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / ConnectionInterfaceCollection.cs / 1305376 / ConnectionInterfaceCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.ComponentModel; 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); } } } // 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.ComponentModel; 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); } } } // 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
- GraphicsContainer.cs
- TemplatePartAttribute.cs
- FileCodeGroup.cs
- BinaryMethodMessage.cs
- SoapTypeAttribute.cs
- FixedDocumentPaginator.cs
- ScriptManagerProxy.cs
- _SecureChannel.cs
- TriState.cs
- RectangleHotSpot.cs
- DefaultPrintController.cs
- JoinGraph.cs
- ArrayListCollectionBase.cs
- DownloadProgressEventArgs.cs
- ProfilePropertyNameValidator.cs
- MemberAccessException.cs
- SystemTcpConnection.cs
- PropertyTabAttribute.cs
- BamlLocalizer.cs
- BindingMAnagerBase.cs
- ParserExtension.cs
- MsmqAuthenticationMode.cs
- Closure.cs
- MemberInfoSerializationHolder.cs
- securitycriticaldataformultiplegetandset.cs
- FormView.cs
- XmlValueConverter.cs
- XPathArrayIterator.cs
- XNodeValidator.cs
- MediaSystem.cs
- StylusPointDescription.cs
- SqlDataSourceConfigureFilterForm.cs
- ToolStripHighContrastRenderer.cs
- AffineTransform3D.cs
- SchemaManager.cs
- KeyInstance.cs
- TaiwanCalendar.cs
- LeafCellTreeNode.cs
- SqlCommandSet.cs
- FileDataSourceCache.cs
- ToolStripMenuItemCodeDomSerializer.cs
- DefinitionUpdate.cs
- StateChangeEvent.cs
- XmlQuerySequence.cs
- SystemResourceKey.cs
- HttpConfigurationContext.cs
- HideDisabledControlAdapter.cs
- DataBindingList.cs
- EmptyControlCollection.cs
- DataContractSerializerOperationBehavior.cs
- ObjectResult.cs
- ImportedNamespaceContextItem.cs
- VirtualizingPanel.cs
- CodeMemberEvent.cs
- DataTableClearEvent.cs
- HttpWriter.cs
- BitmapSizeOptions.cs
- CodeBinaryOperatorExpression.cs
- HostProtectionPermission.cs
- TextView.cs
- InvokeSchedule.cs
- RenderDataDrawingContext.cs
- XmlReaderDelegator.cs
- IResourceProvider.cs
- LoadedOrUnloadedOperation.cs
- MouseButtonEventArgs.cs
- HostVisual.cs
- SpeakProgressEventArgs.cs
- CodeSubDirectoriesCollection.cs
- Pipe.cs
- DefaultValueAttribute.cs
- ToolTipAutomationPeer.cs
- figurelength.cs
- ExceptionUtility.cs
- StringResourceManager.cs
- SQLMembershipProvider.cs
- TypeLoadException.cs
- DispatchWrapper.cs
- DSACryptoServiceProvider.cs
- MiniParameterInfo.cs
- CodeGenHelper.cs
- DataGridViewColumnEventArgs.cs
- Triplet.cs
- ControlParameter.cs
- HostDesigntimeLicenseContext.cs
- XComponentModel.cs
- StaticSiteMapProvider.cs
- SingleAnimationBase.cs
- GetWinFXPath.cs
- InputScopeNameConverter.cs
- SqlBulkCopy.cs
- TreeNodeMouseHoverEvent.cs
- PatternMatcher.cs
- BamlTreeNode.cs
- RijndaelCryptoServiceProvider.cs
- TreeNodeMouseHoverEvent.cs
- IBuiltInEvidence.cs
- X509SecurityToken.cs
- StackOverflowException.cs
- PropertyItem.cs