Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DataGridViewCellFormattingEventArgs.cs
- PnrpPermission.cs
- SortKey.cs
- PolyLineSegment.cs
- MILUtilities.cs
- StylusPointPropertyInfoDefaults.cs
- EventSetter.cs
- CommentEmitter.cs
- DbDataAdapter.cs
- PartialCachingControl.cs
- AbandonedMutexException.cs
- NestPullup.cs
- ApplicationActivator.cs
- BindingSource.cs
- FunctionParameter.cs
- CompatibleComparer.cs
- LoadedEvent.cs
- AudioSignalProblemOccurredEventArgs.cs
- TextEditorTyping.cs
- ObjectListShowCommandsEventArgs.cs
- StateElementCollection.cs
- CalendarAutoFormatDialog.cs
- DragDrop.cs
- AnimationStorage.cs
- XmlUtil.cs
- ChannelBinding.cs
- HeaderElement.cs
- Pkcs7Signer.cs
- AttributeQuery.cs
- SqlFileStream.cs
- SmiEventStream.cs
- StrongBox.cs
- CombinedGeometry.cs
- PackageProperties.cs
- _ListenerAsyncResult.cs
- RedistVersionInfo.cs
- InheritedPropertyChangedEventArgs.cs
- XPathMessageContext.cs
- UnsafeNativeMethods.cs
- OutputScopeManager.cs
- SessionMode.cs
- SiteOfOriginPart.cs
- FormsAuthenticationModule.cs
- CodeIdentifier.cs
- SafeMILHandle.cs
- SqlDependencyListener.cs
- XmlSequenceWriter.cs
- SiteMapHierarchicalDataSourceView.cs
- XmlLangPropertyAttribute.cs
- SystemWebSectionGroup.cs
- ModuleBuilderData.cs
- CheckBoxRenderer.cs
- LazyTextWriterCreator.cs
- QuadraticBezierSegment.cs
- GeneralTransform3DGroup.cs
- SQLBinaryStorage.cs
- ContentPosition.cs
- RelOps.cs
- CheckBoxList.cs
- UIPermission.cs
- TableDetailsCollection.cs
- ParentQuery.cs
- WindowsIdentity.cs
- Listbox.cs
- InstancePersistence.cs
- ToolStripDropDownClosedEventArgs.cs
- DetailsViewDeletedEventArgs.cs
- StringCollection.cs
- SqlParameterCollection.cs
- OAVariantLib.cs
- BehaviorEditorPart.cs
- DefaultBinder.cs
- InfoCardArgumentException.cs
- Double.cs
- EventLogSession.cs
- HebrewCalendar.cs
- Int16Storage.cs
- VisualTreeUtils.cs
- ConfigXmlAttribute.cs
- RuntimeConfigurationRecord.cs
- FragmentQueryKB.cs
- PropertyBuilder.cs
- ColorContext.cs
- RemoteWebConfigurationHost.cs
- MouseActionConverter.cs
- WindowsAuthenticationModule.cs
- WpfGeneratedKnownProperties.cs
- DesignTimeTemplateParser.cs
- MergePropertyDescriptor.cs
- ImportOptions.cs
- SizeIndependentAnimationStorage.cs
- ArcSegment.cs
- SmiEventSink.cs
- Point.cs
- SerializationSectionGroup.cs
- PropertyInfo.cs
- SQLBinaryStorage.cs
- ErrorTableItemStyle.cs
- MetadataPropertyCollection.cs
- NamedPipeAppDomainProtocolHandler.cs