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
- _RequestLifetimeSetter.cs
- SHA256CryptoServiceProvider.cs
- BamlTreeUpdater.cs
- HtmlInputReset.cs
- DataGridColumnReorderingEventArgs.cs
- TemplateXamlParser.cs
- XmlValueConverter.cs
- RoleService.cs
- CounterCreationData.cs
- FileChangesMonitor.cs
- RawUIStateInputReport.cs
- ToolStripRenderEventArgs.cs
- AdvancedBindingPropertyDescriptor.cs
- BinaryReader.cs
- WindowsListViewGroupSubsetLink.cs
- PartialCachingControl.cs
- WebColorConverter.cs
- HwndSubclass.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- ClientCultureInfo.cs
- SchemaImporterExtensionsSection.cs
- Empty.cs
- SqlDataSourceEnumerator.cs
- BlurBitmapEffect.cs
- AxWrapperGen.cs
- ArithmeticException.cs
- EntityDataSourceReferenceGroup.cs
- TempFiles.cs
- XomlSerializationHelpers.cs
- HostProtectionException.cs
- ComplexTypeEmitter.cs
- InvariantComparer.cs
- XmlMtomWriter.cs
- NavigatorOutput.cs
- Menu.cs
- ScopelessEnumAttribute.cs
- CookieProtection.cs
- TextTreeTextNode.cs
- WindowsMenu.cs
- UInt64.cs
- CodeMemberMethod.cs
- EventProviderWriter.cs
- SqlBooleanMismatchVisitor.cs
- OleDbException.cs
- RemoteWebConfigurationHost.cs
- ExceptionUtil.cs
- WindowsButton.cs
- PasswordTextContainer.cs
- XamlValidatingReader.cs
- HostingEnvironment.cs
- DataMemberListEditor.cs
- ScriptRegistrationManager.cs
- RewritingValidator.cs
- ListMarkerSourceInfo.cs
- BasicExpandProvider.cs
- EdmFunctions.cs
- MonthChangedEventArgs.cs
- ExtendedPropertyDescriptor.cs
- MessageEventSubscriptionService.cs
- StreamUpdate.cs
- BoolExpression.cs
- PtsPage.cs
- HtmlInputReset.cs
- AffineTransform3D.cs
- Exceptions.cs
- NodeInfo.cs
- _SSPIWrapper.cs
- PropertyStore.cs
- ListViewItem.cs
- SortQuery.cs
- IdentityModelStringsVersion1.cs
- DrawingState.cs
- XmlDataSourceNodeDescriptor.cs
- DataGridViewCellStyleChangedEventArgs.cs
- HtmlProps.cs
- SqlComparer.cs
- DataRow.cs
- TextElementEnumerator.cs
- ListViewSelectEventArgs.cs
- ImageListUtils.cs
- Library.cs
- HwndSubclass.cs
- ContainerUIElement3D.cs
- NoResizeSelectionBorderGlyph.cs
- VScrollBar.cs
- ExclusiveHandleList.cs
- OdbcRowUpdatingEvent.cs
- AspCompat.cs
- PenThreadWorker.cs
- cryptoapiTransform.cs
- SafeSecurityHandles.cs
- BoundingRectTracker.cs
- InvalidCommandTreeException.cs
- CodeExporter.cs
- DataGridViewCellStateChangedEventArgs.cs
- NamedPipeAppDomainProtocolHandler.cs
- EUCJPEncoding.cs
- ByteArrayHelperWithString.cs
- IQueryable.cs
- DBDataPermission.cs