Code:
/ DotNET / DotNET / 8.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
- AutomationElementCollection.cs
- TextBoxBase.cs
- XmlSchemaSimpleTypeUnion.cs
- ContentControl.cs
- HtmlInputFile.cs
- Vector.cs
- OlePropertyStructs.cs
- XmlNamespaceManager.cs
- SmtpClient.cs
- UnaryOperationBinder.cs
- controlskin.cs
- ItemsChangedEventArgs.cs
- DropSourceBehavior.cs
- ReferenceConverter.cs
- GlobalizationSection.cs
- DbProviderConfigurationHandler.cs
- XmlNamespaceManager.cs
- Command.cs
- SolidColorBrush.cs
- PriorityQueue.cs
- documentsequencetextview.cs
- ComponentGuaranteesAttribute.cs
- EventManager.cs
- Method.cs
- Property.cs
- XmlIgnoreAttribute.cs
- ExtentCqlBlock.cs
- BitSet.cs
- SendReply.cs
- XAMLParseException.cs
- RoutedEvent.cs
- GenericTypeParameterBuilder.cs
- CriticalHandle.cs
- AutomationElement.cs
- WrappingXamlSchemaContext.cs
- RadioButtonList.cs
- StringBuilder.cs
- Accessible.cs
- ControlAdapter.cs
- MatrixValueSerializer.cs
- RawStylusInputReport.cs
- InstanceData.cs
- HttpServerUtilityWrapper.cs
- SqlAliaser.cs
- DecoderNLS.cs
- DisableDpiAwarenessAttribute.cs
- ContentHostHelper.cs
- UxThemeWrapper.cs
- WebServiceReceive.cs
- controlskin.cs
- MenuEventArgs.cs
- odbcmetadatacollectionnames.cs
- Encoding.cs
- WaitHandleCannotBeOpenedException.cs
- SocketStream.cs
- AttributeExtensions.cs
- ClientScriptItem.cs
- TableLayoutPanel.cs
- ColumnResult.cs
- WindowsGraphics.cs
- SerializerDescriptor.cs
- DataStreamFromComStream.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- HandleValueEditor.cs
- SQLByte.cs
- TargetException.cs
- ObjectListCommandsPage.cs
- ProfileSettings.cs
- SoapSchemaExporter.cs
- DictionaryKeyPropertyAttribute.cs
- OleDbException.cs
- RewritingPass.cs
- COM2IDispatchConverter.cs
- MsmqInputMessage.cs
- Propagator.Evaluator.cs
- Merger.cs
- EndEvent.cs
- MetadataSerializer.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- SafeRegistryHandle.cs
- RtfFormatStack.cs
- PolyBezierSegmentFigureLogic.cs
- PointUtil.cs
- BinaryObjectReader.cs
- CharacterBufferReference.cs
- Configuration.cs
- ServiceNameCollection.cs
- MenuItem.cs
- ServiceDescriptionData.cs
- EventDescriptor.cs
- Pair.cs
- Utils.cs
- FileNotFoundException.cs
- ScrollViewer.cs
- IisTraceListener.cs
- BitFlagsGenerator.cs
- AmbientValueAttribute.cs
- Command.cs
- ObjectListDataBindEventArgs.cs
- TextTreeTextNode.cs