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
- XPathAncestorQuery.cs
- Mutex.cs
- Verify.cs
- CancelEventArgs.cs
- UpdateManifestForBrowserApplication.cs
- ObjectDataSourceStatusEventArgs.cs
- FontNameEditor.cs
- _SSPISessionCache.cs
- FixedElement.cs
- CodeDefaultValueExpression.cs
- IOThreadScheduler.cs
- ContentType.cs
- FileDialog.cs
- UnaryNode.cs
- DateTimeFormatInfoScanner.cs
- LineBreakRecord.cs
- FontEditor.cs
- ResourceBinder.cs
- BlockUIContainer.cs
- MetadataItemCollectionFactory.cs
- WebColorConverter.cs
- SchemaImporter.cs
- SqlClientWrapperSmiStream.cs
- MetaColumn.cs
- ThreadAttributes.cs
- NullableBoolConverter.cs
- PrivilegeNotHeldException.cs
- SafeCryptoHandles.cs
- NamespaceList.cs
- SelectionProviderWrapper.cs
- _SpnDictionary.cs
- Win32MouseDevice.cs
- EventHandlerService.cs
- Error.cs
- TypeElement.cs
- HashMembershipCondition.cs
- XPathDescendantIterator.cs
- HGlobalSafeHandle.cs
- FamilyTypefaceCollection.cs
- ColumnClickEvent.cs
- HyperLinkColumn.cs
- WebPartHeaderCloseVerb.cs
- CompositeTypefaceMetrics.cs
- EmptyElement.cs
- PeerTransportElement.cs
- WindowsFont.cs
- ViewSimplifier.cs
- HttpWebRequestElement.cs
- FixedDocumentPaginator.cs
- WsatStrings.cs
- Invariant.cs
- ImmutableObjectAttribute.cs
- RecognizerBase.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- XmlSchemaGroup.cs
- ErrorTableItemStyle.cs
- ToolbarAUtomationPeer.cs
- ContextTokenTypeConverter.cs
- ExpressionVisitorHelpers.cs
- DataGridViewRow.cs
- TemplateContentLoader.cs
- AllowedAudienceUriElementCollection.cs
- Floater.cs
- RelationshipWrapper.cs
- ProcessHost.cs
- WindowsProgressbar.cs
- EntityAdapter.cs
- XmlElementAttribute.cs
- ToolStripItemClickedEventArgs.cs
- BaseResourcesBuildProvider.cs
- OleDbCommand.cs
- GroupStyle.cs
- ProviderUtil.cs
- IItemProperties.cs
- RuleValidation.cs
- XPathParser.cs
- Message.cs
- DesignerLoader.cs
- Peer.cs
- DataGridViewComboBoxEditingControl.cs
- SmtpReplyReaderFactory.cs
- DefaultTraceListener.cs
- EdmError.cs
- ThreadExceptionEvent.cs
- CopyAction.cs
- LayoutManager.cs
- RawStylusInputCustomData.cs
- UpdateTracker.cs
- XpsS0ValidatingLoader.cs
- FormViewModeEventArgs.cs
- PageCodeDomTreeGenerator.cs
- Main.cs
- SizeFConverter.cs
- ExceptionUtil.cs
- IPHostEntry.cs
- UTF8Encoding.cs
- InvokeProviderWrapper.cs
- OdbcHandle.cs
- WorkflowEventArgs.cs
- RelOps.cs