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
- WebPartDisplayMode.cs
- HierarchicalDataSourceControl.cs
- RowVisual.cs
- SmiMetaDataProperty.cs
- Single.cs
- ReferencedAssembly.cs
- AnnotationObservableCollection.cs
- AssociationTypeEmitter.cs
- TrackingDataItem.cs
- TTSVoice.cs
- filewebrequest.cs
- ImageAttributes.cs
- Lookup.cs
- Attachment.cs
- PageCodeDomTreeGenerator.cs
- ContentDisposition.cs
- GatewayIPAddressInformationCollection.cs
- GrammarBuilder.cs
- Converter.cs
- Brush.cs
- LineUtil.cs
- WebPartCancelEventArgs.cs
- BitStream.cs
- Marshal.cs
- ModelFactory.cs
- SiteMapNodeItem.cs
- WebPartEventArgs.cs
- HebrewCalendar.cs
- VectorConverter.cs
- Compilation.cs
- EventRecord.cs
- securitycriticaldata.cs
- Encoder.cs
- ArgumentOutOfRangeException.cs
- _LazyAsyncResult.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- TypeListConverter.cs
- ClientSettings.cs
- AxHost.cs
- ISFTagAndGuidCache.cs
- Stack.cs
- TableRowGroup.cs
- PropertyChangeTracker.cs
- SecurityStandardsManager.cs
- IteratorDescriptor.cs
- MobileControlDesigner.cs
- ListSortDescriptionCollection.cs
- DataGridAutoGeneratingColumnEventArgs.cs
- ResourceKey.cs
- OutputChannelBinder.cs
- JavascriptCallbackMessageInspector.cs
- DataGridViewRowStateChangedEventArgs.cs
- SelectionRangeConverter.cs
- CommandID.cs
- WinInetCache.cs
- ReadOnlyAttribute.cs
- DataGridCellInfo.cs
- SelectionProviderWrapper.cs
- Frame.cs
- DataSourceHelper.cs
- OleDbErrorCollection.cs
- _ProxyChain.cs
- IsolatedStorageFileStream.cs
- XamlSerializer.cs
- ToolStripDesignerUtils.cs
- DataContractSerializerSection.cs
- CodeNamespaceImportCollection.cs
- SecurityElement.cs
- FrameworkReadOnlyPropertyMetadata.cs
- ColorConvertedBitmap.cs
- Random.cs
- InputScopeManager.cs
- GeneralTransformGroup.cs
- HandledMouseEvent.cs
- ClientTargetCollection.cs
- Win32PrintDialog.cs
- MSHTMLHost.cs
- GlobalEventManager.cs
- Trace.cs
- NavigationEventArgs.cs
- LocatorPartList.cs
- coordinator.cs
- TextTreeTextElementNode.cs
- SettingsSavedEventArgs.cs
- EventRouteFactory.cs
- UInt32Storage.cs
- ReflectPropertyDescriptor.cs
- SmtpNegotiateAuthenticationModule.cs
- DragCompletedEventArgs.cs
- Psha1DerivedKeyGenerator.cs
- EntitySetDataBindingList.cs
- AppDomainManager.cs
- ClientType.cs
- DataKey.cs
- IndicCharClassifier.cs
- Hash.cs
- ADConnectionHelper.cs
- SqlDataRecord.cs
- Operand.cs
- ExternalCalls.cs