Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- nulltextnavigator.cs
- DataGridViewComboBoxCell.cs
- SyndicationSerializer.cs
- BindingCollection.cs
- IdentitySection.cs
- DeviceContext2.cs
- AutomationPropertyInfo.cs
- InstanceOwner.cs
- ShellProvider.cs
- ImportException.cs
- ProbeRequestResponseAsyncResult.cs
- DrawingContextDrawingContextWalker.cs
- Publisher.cs
- NullExtension.cs
- keycontainerpermission.cs
- ObservableDictionary.cs
- CustomErrorCollection.cs
- xmlfixedPageInfo.cs
- CodeDirectionExpression.cs
- CodeMemberEvent.cs
- DesignerGeometryHelper.cs
- DynamicRendererThreadManager.cs
- Listbox.cs
- HostVisual.cs
- FontStretches.cs
- SqlCommandBuilder.cs
- InvalidDataContractException.cs
- GeneratedCodeAttribute.cs
- XmlText.cs
- DataGridViewDesigner.cs
- FrameAutomationPeer.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- ToolStripDropDown.cs
- AspCompat.cs
- SerialPort.cs
- ServiceHostFactory.cs
- XmlSchemaAnnotated.cs
- NameValueFileSectionHandler.cs
- BaseCollection.cs
- WorkflowServiceInstance.cs
- HttpHandlersSection.cs
- DataTable.cs
- PasswordRecovery.cs
- RSAPKCS1SignatureDeformatter.cs
- SAPIEngineTypes.cs
- BaseComponentEditor.cs
- BitmapPalette.cs
- ADMembershipUser.cs
- MissingMethodException.cs
- StorageRoot.cs
- ProxyFragment.cs
- OleDbCommand.cs
- InputLanguageSource.cs
- MethodCallTranslator.cs
- PtsHelper.cs
- ParseElement.cs
- UnsafeNativeMethods.cs
- LinkDesigner.cs
- AuthenticationModulesSection.cs
- ForceCopyBuildProvider.cs
- FontNamesConverter.cs
- UTF32Encoding.cs
- ActivityCodeDomSerializer.cs
- CompModSwitches.cs
- DataServiceRequestException.cs
- CustomTypeDescriptor.cs
- WindowsEditBoxRange.cs
- GridViewCommandEventArgs.cs
- ObjectStateManagerMetadata.cs
- comcontractssection.cs
- ClientBuildManager.cs
- CriticalExceptions.cs
- UpdatePanel.cs
- AnnotationComponentManager.cs
- SafeProcessHandle.cs
- BoolExpressionVisitors.cs
- DrawingBrush.cs
- Geometry3D.cs
- DescendentsWalker.cs
- TcpSocketManager.cs
- ListControlBuilder.cs
- XmlSignatureProperties.cs
- JournalEntryListConverter.cs
- PropertyChangedEventManager.cs
- DateTimeSerializationSection.cs
- ArrayEditor.cs
- AvTraceDetails.cs
- FunctionImportElement.cs
- Menu.cs
- SchemaExporter.cs
- EmbeddedObject.cs
- SystemBrushes.cs
- GetIsBrowserClientRequest.cs
- DisplayMemberTemplateSelector.cs
- DispatcherOperation.cs
- SwitchDesigner.xaml.cs
- InteropBitmapSource.cs
- listviewsubitemcollectioneditor.cs
- PlatformCulture.cs
- OrderedEnumerableRowCollection.cs