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
- SqlRowUpdatedEvent.cs
- TreeViewDesigner.cs
- PenThreadWorker.cs
- ValidationSummary.cs
- XmlUTF8TextReader.cs
- Point3D.cs
- PropertyPathConverter.cs
- DataColumnMappingCollection.cs
- ClientRuntime.cs
- EncoderExceptionFallback.cs
- HtmlMeta.cs
- ConfigXmlCDataSection.cs
- SoapSchemaExporter.cs
- HostedTransportConfigurationBase.cs
- StandardToolWindows.cs
- TimeSpanConverter.cs
- CheckBox.cs
- PropertyMap.cs
- Dispatcher.cs
- SQLDateTime.cs
- IChannel.cs
- clipboard.cs
- MessageEnumerator.cs
- TableLayoutStyleCollection.cs
- JavaScriptString.cs
- DataGridViewHeaderCell.cs
- MessagePartDescriptionCollection.cs
- ScrollChrome.cs
- ComponentSerializationService.cs
- ActivationWorker.cs
- PauseStoryboard.cs
- HtmlTernaryTree.cs
- WmfPlaceableFileHeader.cs
- SpotLight.cs
- ColumnResizeAdorner.cs
- WebService.cs
- TypeLoadException.cs
- ConfigXmlCDataSection.cs
- DBSchemaRow.cs
- UpDownEvent.cs
- ContextMenuStrip.cs
- CapabilitiesState.cs
- ProtocolElement.cs
- PropertyMapper.cs
- ClrPerspective.cs
- DataControlField.cs
- SessionSwitchEventArgs.cs
- iisPickupDirectory.cs
- LinqDataSourceInsertEventArgs.cs
- documentsequencetextcontainer.cs
- RuleInfoComparer.cs
- ToolStripPanelRow.cs
- CodeDirectiveCollection.cs
- ZipFileInfoCollection.cs
- WorkflowServiceNamespace.cs
- OneOfConst.cs
- PeerNameResolver.cs
- UIElementParagraph.cs
- ImageCodecInfoPrivate.cs
- WmlControlAdapter.cs
- UnauthorizedWebPart.cs
- XmlHierarchicalDataSourceView.cs
- SqlPersonalizationProvider.cs
- DbProviderConfigurationHandler.cs
- SequentialUshortCollection.cs
- SessionPageStateSection.cs
- SequentialWorkflowRootDesigner.cs
- CacheDependency.cs
- XmlSignatureManifest.cs
- HttpResponseHeader.cs
- Descriptor.cs
- GridViewUpdateEventArgs.cs
- CompiledQueryCacheEntry.cs
- TreeViewItem.cs
- SettingsPropertyValue.cs
- SectionInput.cs
- UserControl.cs
- TrackingStringDictionary.cs
- FontWeightConverter.cs
- MetaTableHelper.cs
- Animatable.cs
- FolderBrowserDialog.cs
- WebConfigurationManager.cs
- MemberPath.cs
- ApplicationId.cs
- SamlConditions.cs
- SchemaSetCompiler.cs
- RotateTransform.cs
- SimpleBitVector32.cs
- UserControlBuildProvider.cs
- DataSourceControl.cs
- PrintController.cs
- SqlCommandSet.cs
- MimeFormatter.cs
- DataBinding.cs
- HtmlWindow.cs
- BindingExpressionUncommonField.cs
- MarkupCompilePass2.cs
- CanExecuteRoutedEventArgs.cs
- PathStreamGeometryContext.cs