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
- ButtonStandardAdapter.cs
- BaseTreeIterator.cs
- DelegateBodyWriter.cs
- HMACSHA1.cs
- RowUpdatingEventArgs.cs
- RadioButtonBaseAdapter.cs
- LinqDataSourceContextEventArgs.cs
- StrongTypingException.cs
- XmlHierarchicalDataSourceView.cs
- CodeParameterDeclarationExpression.cs
- StorageComplexPropertyMapping.cs
- SqlDataSourceEnumerator.cs
- ComplexLine.cs
- ServerValidateEventArgs.cs
- UIElementCollection.cs
- BinaryNode.cs
- PathBox.cs
- PropertyCollection.cs
- FlowDecisionLabelFeature.cs
- BindingValueChangedEventArgs.cs
- DataGridViewAdvancedBorderStyle.cs
- XmlNamespaceDeclarationsAttribute.cs
- ColumnResizeAdorner.cs
- RichTextBoxAutomationPeer.cs
- CatalogPartChrome.cs
- DropTarget.cs
- CodeSubDirectoriesCollection.cs
- ThreadPool.cs
- XmlQualifiedNameTest.cs
- BitmapFrameDecode.cs
- XmlSchemaIdentityConstraint.cs
- ThrowOnMultipleAssignment.cs
- BaseCodeDomTreeGenerator.cs
- MILUtilities.cs
- NameValueCollection.cs
- _SslSessionsCache.cs
- PointLight.cs
- xsdvalidator.cs
- LocalizableAttribute.cs
- TransformValueSerializer.cs
- ErrorHandler.cs
- ConvertEvent.cs
- DataColumnSelectionConverter.cs
- TableParaClient.cs
- RepeaterCommandEventArgs.cs
- FakeModelPropertyImpl.cs
- RenderOptions.cs
- ToolStripItemRenderEventArgs.cs
- GridViewAutomationPeer.cs
- TemplateInstanceAttribute.cs
- ButtonBase.cs
- ListSortDescription.cs
- ToolStripSettings.cs
- PostBackTrigger.cs
- DurableDispatcherAddressingFault.cs
- XmlSignificantWhitespace.cs
- COM2ComponentEditor.cs
- DotExpr.cs
- ReferenceConverter.cs
- ToolBarButtonClickEvent.cs
- ChtmlTextWriter.cs
- DetailsViewPagerRow.cs
- PrinterSettings.cs
- FrameworkContentElement.cs
- WebPartDisplayModeEventArgs.cs
- ProfileParameter.cs
- _SslStream.cs
- EncryptedReference.cs
- X509CertificateClaimSet.cs
- SelectionService.cs
- RawUIStateInputReport.cs
- SubordinateTransaction.cs
- SafeJobHandle.cs
- ProxyManager.cs
- RemotingConfiguration.cs
- WeakRefEnumerator.cs
- SignatureDescription.cs
- Track.cs
- ReachIDocumentPaginatorSerializer.cs
- RequiredFieldValidator.cs
- BamlRecordReader.cs
- KeyGestureConverter.cs
- EnvelopedSignatureTransform.cs
- WriterOutput.cs
- ProfileModule.cs
- TransformConverter.cs
- XmlSchemaDatatype.cs
- MultiByteCodec.cs
- AssociationSetMetadata.cs
- XmlDataImplementation.cs
- SqlDataSourceSelectingEventArgs.cs
- SqlMetaData.cs
- CodeDomConfigurationHandler.cs
- ScriptReferenceBase.cs
- StorageAssociationSetMapping.cs
- RtfToken.cs
- BitmapSource.cs
- OutputScope.cs
- IgnoreFileBuildProvider.cs
- ProtocolElementCollection.cs