Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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); } } } // 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; 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); } } } // 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
- TablePattern.cs
- ResourceExpressionEditor.cs
- RedistVersionInfo.cs
- ColorMatrix.cs
- XsltInput.cs
- DataList.cs
- BamlTreeNode.cs
- DataRow.cs
- Baml6ConstructorInfo.cs
- StreamingContext.cs
- HtmlContainerControl.cs
- Util.cs
- _DomainName.cs
- PeerDuplexChannel.cs
- ThrowHelper.cs
- StatusBar.cs
- Vector.cs
- FormsAuthenticationTicket.cs
- DataTableCollection.cs
- DataListItemCollection.cs
- XsltContext.cs
- MultiPartWriter.cs
- ToolStripGrip.cs
- SuppressMessageAttribute.cs
- XmlILOptimizerVisitor.cs
- MsmqDiagnostics.cs
- ContextMarshalException.cs
- ServiceRoute.cs
- SrgsElement.cs
- ComplexPropertyEntry.cs
- AxisAngleRotation3D.cs
- DescriptionAttribute.cs
- EntityReference.cs
- InputReport.cs
- QilFunction.cs
- Span.cs
- XmlAnyElementAttribute.cs
- sortedlist.cs
- BoundingRectTracker.cs
- FunctionNode.cs
- NavigationExpr.cs
- _NestedMultipleAsyncResult.cs
- MouseDevice.cs
- ConvertersCollection.cs
- PrimitiveSchema.cs
- SizeFConverter.cs
- SqlReferenceCollection.cs
- ApplicationSettingsBase.cs
- CurrentChangedEventManager.cs
- SqlDataSourceSelectingEventArgs.cs
- OdbcConnection.cs
- GridViewSelectEventArgs.cs
- DataGridViewColumnConverter.cs
- ListViewDataItem.cs
- XmlNamespaceDeclarationsAttribute.cs
- DataSetMappper.cs
- Models.cs
- ApplyImportsAction.cs
- PhysicalAddress.cs
- DataGridViewSelectedCellCollection.cs
- SchemaName.cs
- oledbmetadatacolumnnames.cs
- TagPrefixInfo.cs
- ServiceContractListItemList.cs
- WindowsServiceCredential.cs
- TextFormatterHost.cs
- ExtentCqlBlock.cs
- DataGridColumnHeaderAutomationPeer.cs
- WeakReference.cs
- DataGrid.cs
- InvalidCastException.cs
- ComponentConverter.cs
- SBCSCodePageEncoding.cs
- HttpBindingExtension.cs
- TableRowCollection.cs
- PropertyStore.cs
- SignatureToken.cs
- MenuItemAutomationPeer.cs
- BCLDebug.cs
- SqlBulkCopyColumnMapping.cs
- MasterPageParser.cs
- TdsParameterSetter.cs
- SharedStatics.cs
- DisplayClaim.cs
- HtmlElementEventArgs.cs
- IdentityValidationException.cs
- ScriptComponentDescriptor.cs
- EventDescriptor.cs
- DataStreams.cs
- RenameRuleObjectDialog.Designer.cs
- WindowAutomationPeer.cs
- HttpCacheVary.cs
- FileDetails.cs
- MarkupExtensionParser.cs
- LineMetrics.cs
- Control.cs
- CodeSubDirectory.cs
- HttpCapabilitiesSectionHandler.cs
- ToolBarOverflowPanel.cs
- CacheModeConverter.cs