Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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 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. //------------------------------------------------------------------------------ //// 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 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeMethodReturnStatement.cs
- Model3DGroup.cs
- TableRowGroup.cs
- XmlLanguage.cs
- DbModificationCommandTree.cs
- UntrustedRecipientException.cs
- HttpModuleCollection.cs
- WebConfigurationManager.cs
- EntityDataSourceColumn.cs
- ResourceReferenceExpression.cs
- ConsumerConnectionPointCollection.cs
- listitem.cs
- NameHandler.cs
- MsmqMessageSerializationFormat.cs
- LazyTextWriterCreator.cs
- OleDragDropHandler.cs
- SecurityPolicySection.cs
- StylusPointPropertyUnit.cs
- TextBoxRenderer.cs
- OrderPreservingMergeHelper.cs
- CommonGetThemePartSize.cs
- ApplicationProxyInternal.cs
- Expressions.cs
- QuotedPrintableStream.cs
- XpsFixedPageReaderWriter.cs
- LicFileLicenseProvider.cs
- LostFocusEventManager.cs
- SqlVisitor.cs
- MarginCollapsingState.cs
- AuthenticateEventArgs.cs
- _DigestClient.cs
- LabelInfo.cs
- RadioButton.cs
- SqlGenerator.cs
- AccessibleObject.cs
- WindowsScrollBarBits.cs
- FieldBuilder.cs
- Canvas.cs
- CopyAction.cs
- ThreadExceptionDialog.cs
- Rotation3D.cs
- OdbcStatementHandle.cs
- Crc32.cs
- GridViewPageEventArgs.cs
- Processor.cs
- NetworkAddressChange.cs
- UnsafeNativeMethods.cs
- CodeRemoveEventStatement.cs
- TreeViewTemplateSelector.cs
- XmlProcessingInstruction.cs
- TargetFrameworkAttribute.cs
- XmlSchemaSimpleTypeList.cs
- FlowPanelDesigner.cs
- ValidatedControlConverter.cs
- ListenerSingletonConnectionReader.cs
- BitmapImage.cs
- elementinformation.cs
- SpoolingTaskBase.cs
- XmlSchemaInclude.cs
- ObjectPersistData.cs
- EntityDataSourceWizardForm.cs
- ADConnectionHelper.cs
- SqlReorderer.cs
- XmlReaderSettings.cs
- DbException.cs
- StrokeIntersection.cs
- BitmapEffectvisualstate.cs
- CacheRequest.cs
- SignatureHelper.cs
- SafeRegistryHandle.cs
- Encoding.cs
- DynamicValidatorEventArgs.cs
- _SafeNetHandles.cs
- Model3D.cs
- AddDataControlFieldDialog.cs
- MessageQueueConverter.cs
- HotSpotCollectionEditor.cs
- PolyLineSegmentFigureLogic.cs
- HotCommands.cs
- GeometryConverter.cs
- _CacheStreams.cs
- SafeBuffer.cs
- Encoder.cs
- SerializationException.cs
- UpdateTranslator.cs
- DataGridViewLinkCell.cs
- PointAnimationClockResource.cs
- LayoutUtils.cs
- SymmetricKeyWrap.cs
- GiveFeedbackEvent.cs
- CompositeClientFormatter.cs
- LineInfo.cs
- AttributeCollection.cs
- StylusPointDescription.cs
- x509store.cs
- EditCommandColumn.cs
- DataGridViewUtilities.cs
- PtsPage.cs
- Matrix3DValueSerializer.cs
- CurrencyWrapper.cs