Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- ComponentChangedEvent.cs
- QueryContinueDragEvent.cs
- ResourceContainer.cs
- ExpandedProjectionNode.cs
- EntityDataSourceColumn.cs
- CellIdBoolean.cs
- StreamWriter.cs
- PowerStatus.cs
- TypeUtil.cs
- Help.cs
- SqlCommand.cs
- SqlWebEventProvider.cs
- UmAlQuraCalendar.cs
- CheckPair.cs
- HTTPNotFoundHandler.cs
- Button.cs
- DataViewManagerListItemTypeDescriptor.cs
- IntermediatePolicyValidator.cs
- WsdlContractConversionContext.cs
- XmlTextWriter.cs
- CryptoProvider.cs
- Memoizer.cs
- SqlWebEventProvider.cs
- DataGridTablesFactory.cs
- AsyncPostBackTrigger.cs
- XmlTextReaderImpl.cs
- EnumerableRowCollectionExtensions.cs
- StructuredTypeInfo.cs
- XmlNode.cs
- ReturnType.cs
- FrameworkContextData.cs
- InlineCategoriesDocument.cs
- DataGridCommandEventArgs.cs
- wgx_render.cs
- TextServicesLoader.cs
- SimpleApplicationHost.cs
- DataGridViewRowStateChangedEventArgs.cs
- WsdlInspector.cs
- RetrieveVirtualItemEventArgs.cs
- WebServiceEnumData.cs
- OracleNumber.cs
- SafeFileMappingHandle.cs
- TimeSpanConverter.cs
- BrowserCapabilitiesFactory.cs
- TypeLoadException.cs
- PropertyInformation.cs
- SoapTypeAttribute.cs
- Expression.cs
- DataSet.cs
- TransformedBitmap.cs
- DataServiceHost.cs
- TypeLoader.cs
- Html32TextWriter.cs
- HttpHandlersSection.cs
- FixedDSBuilder.cs
- DataGridCell.cs
- EndEvent.cs
- NativeMethods.cs
- TargetControlTypeCache.cs
- TreeNodeCollectionEditorDialog.cs
- DefaultValueTypeConverter.cs
- NetSectionGroup.cs
- RequestQueue.cs
- TextPointer.cs
- Directory.cs
- OleDbEnumerator.cs
- TypeInformation.cs
- UnsafeNativeMethods.cs
- Vector3DCollectionConverter.cs
- LinkedResourceCollection.cs
- DataViewManager.cs
- TimeoutException.cs
- WorkflowRuntimeEndpoint.cs
- JournalEntry.cs
- WorkflowItemsPresenter.cs
- CryptographicAttribute.cs
- Content.cs
- ZipIOModeEnforcingStream.cs
- PageCodeDomTreeGenerator.cs
- EventWaitHandle.cs
- BlobPersonalizationState.cs
- ButtonColumn.cs
- MessageHeaders.cs
- SemanticTag.cs
- HtmlMeta.cs
- IndependentAnimationStorage.cs
- WsdlInspector.cs
- NativeActivityMetadata.cs
- JournalNavigationScope.cs
- InternalConfigRoot.cs
- DocumentSchemaValidator.cs
- CheckBox.cs
- TextSelectionHighlightLayer.cs
- AuthorizationPolicyTypeElement.cs
- ExecutionEngineException.cs
- _IPv4Address.cs
- Brushes.cs
- UInt64.cs
- StandardToolWindows.cs
- GroupDescription.cs