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
- LongValidatorAttribute.cs
- ByeMessageApril2005.cs
- mactripleDES.cs
- InstrumentationTracker.cs
- DataGridViewCell.cs
- XmlAnyElementAttribute.cs
- BitmapEffectGroup.cs
- DbConnectionStringBuilder.cs
- ClientBuildManagerCallback.cs
- StatusBar.cs
- ClassicBorderDecorator.cs
- FormViewModeEventArgs.cs
- BlurEffect.cs
- PieceNameHelper.cs
- GridSplitterAutomationPeer.cs
- DateTimeHelper.cs
- FlowDocument.cs
- TracePayload.cs
- WeakHashtable.cs
- DataGridViewColumnEventArgs.cs
- HyperLinkField.cs
- SpotLight.cs
- ConversionHelper.cs
- PathParser.cs
- WebPartConnectionsCancelVerb.cs
- DataGridViewLinkCell.cs
- WebServiceData.cs
- ConfigXmlWhitespace.cs
- SqlDependencyListener.cs
- ColorAnimationUsingKeyFrames.cs
- ModelVisual3D.cs
- NullableLongSumAggregationOperator.cs
- StylusEventArgs.cs
- DateTimeConstantAttribute.cs
- TrackingProfileDeserializationException.cs
- TabControlToolboxItem.cs
- AttributeSetAction.cs
- ErrorsHelper.cs
- ContractInstanceProvider.cs
- NonDualMessageSecurityOverHttp.cs
- FileDataSourceCache.cs
- BooleanProjectedSlot.cs
- SqlNamer.cs
- srgsitem.cs
- _StreamFramer.cs
- ConnectionPoolManager.cs
- ListItemParagraph.cs
- WebPartDisplayModeCollection.cs
- HttpClientCertificate.cs
- HotSpotCollection.cs
- VisualTreeHelper.cs
- DefaultEvaluationContext.cs
- FindCriteriaCD1.cs
- UserControlCodeDomTreeGenerator.cs
- ConstNode.cs
- LassoHelper.cs
- Menu.cs
- EtwTrackingBehaviorElement.cs
- NativeActivityFaultContext.cs
- SqlDataSourceConnectionPanel.cs
- DataListItemCollection.cs
- ContextBase.cs
- DataGridViewTopLeftHeaderCell.cs
- DLinqAssociationProvider.cs
- PictureBox.cs
- SoapRpcServiceAttribute.cs
- TypeReference.cs
- MetadataArtifactLoaderCompositeFile.cs
- WbmpConverter.cs
- ThreadStaticAttribute.cs
- ActivityExecutorSurrogate.cs
- DecimalConstantAttribute.cs
- SendSecurityHeader.cs
- MemoryMappedViewStream.cs
- XmlChoiceIdentifierAttribute.cs
- HuffModule.cs
- ContentValidator.cs
- ObjectDataSourceChooseMethodsPanel.cs
- PinnedBufferMemoryStream.cs
- Location.cs
- PeerNameRecordCollection.cs
- TraceContext.cs
- SortDescription.cs
- SubMenuStyle.cs
- xsdvalidator.cs
- PointCollection.cs
- StateMachineWorkflowInstance.cs
- HtmlWindow.cs
- BuilderInfo.cs
- IChannel.cs
- serverconfig.cs
- SelectionListDesigner.cs
- TagPrefixAttribute.cs
- ResXResourceSet.cs
- ObfuscateAssemblyAttribute.cs
- SecurityTokenResolver.cs
- ComboBoxRenderer.cs
- X500Name.cs
- ReaderOutput.cs
- FixedSOMGroup.cs