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
- WebPartEditVerb.cs
- DatePickerTextBox.cs
- CheckBoxList.cs
- WebServiceTypeData.cs
- HScrollBar.cs
- DesignerActionVerbItem.cs
- EFDataModelProvider.cs
- DesignTimeTemplateParser.cs
- EntityKeyElement.cs
- OperationAbortedException.cs
- LinkArea.cs
- LogStream.cs
- WindowsTab.cs
- SchemaTypeEmitter.cs
- CodeObject.cs
- CompileLiteralTextParser.cs
- EntitySetBase.cs
- AsymmetricKeyExchangeFormatter.cs
- InProcStateClientManager.cs
- MiniModule.cs
- OperationParameterInfoCollection.cs
- OdbcConnectionPoolProviderInfo.cs
- TiffBitmapEncoder.cs
- HwndPanningFeedback.cs
- XsdDuration.cs
- ProtocolsSection.cs
- BinaryParser.cs
- FormsAuthenticationEventArgs.cs
- Drawing.cs
- FaultCode.cs
- IdentityHolder.cs
- PageAdapter.cs
- MultiPageTextView.cs
- DataControlField.cs
- TraceHandlerErrorFormatter.cs
- FrameworkContentElement.cs
- MemoryFailPoint.cs
- InlinedLocationReference.cs
- NativeBuffer.cs
- UnsafeNativeMethods.cs
- ResourceAttributes.cs
- TextDpi.cs
- ShaderRenderModeValidation.cs
- TypeElementCollection.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- MD5HashHelper.cs
- InputManager.cs
- ReversePositionQuery.cs
- BaseTemplateBuildProvider.cs
- InputEventArgs.cs
- ToolStripCustomTypeDescriptor.cs
- ViewBox.cs
- ExceptionUtil.cs
- HttpResponseHeader.cs
- UnmanagedMemoryStream.cs
- ListControl.cs
- TextElementEditingBehaviorAttribute.cs
- DispatcherTimer.cs
- AuthenticationServiceManager.cs
- RemotingSurrogateSelector.cs
- WebPartConnectionsDisconnectVerb.cs
- ValidationResult.cs
- PhysicalOps.cs
- Pkcs9Attribute.cs
- BitmapMetadataEnumerator.cs
- ObjectCloneHelper.cs
- GridItemProviderWrapper.cs
- EventItfInfo.cs
- BuildResultCache.cs
- ApplicationTrust.cs
- FtpWebResponse.cs
- RegexReplacement.cs
- DataServiceProcessingPipeline.cs
- WebProxyScriptElement.cs
- CompilationPass2Task.cs
- VectorCollection.cs
- SecurityListenerSettingsLifetimeManager.cs
- TerminatorSinks.cs
- ProgressBar.cs
- GetPageCompletedEventArgs.cs
- SymbolResolver.cs
- ToolStripItemImageRenderEventArgs.cs
- NotifyIcon.cs
- BuildProvider.cs
- PartitionerStatic.cs
- DynamicValidator.cs
- ServiceNameCollection.cs
- PermissionToken.cs
- HTTPNotFoundHandler.cs
- AttachmentCollection.cs
- InteropBitmapSource.cs
- WebServiceResponseDesigner.cs
- SiteMapHierarchicalDataSourceView.cs
- ListenUriMode.cs
- IResourceProvider.cs
- TextTabProperties.cs
- ColorConvertedBitmap.cs
- BitSet.cs
- DBCommandBuilder.cs
- ContextActivityUtils.cs