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
- AppPool.cs
- LeafCellTreeNode.cs
- _DisconnectOverlappedAsyncResult.cs
- TextBox.cs
- AutomationPattern.cs
- QueryContext.cs
- Stopwatch.cs
- StateMachineHelpers.cs
- ParserHooks.cs
- TemplateBaseAction.cs
- LicenseManager.cs
- RtfToXamlLexer.cs
- HttpModuleAction.cs
- TextEditorSelection.cs
- DecimalConverter.cs
- ColorConverter.cs
- SignatureDescription.cs
- ComponentDesigner.cs
- DesignerGenericWebPart.cs
- SafeProcessHandle.cs
- XmlnsDefinitionAttribute.cs
- SqlProfileProvider.cs
- WebCodeGenerator.cs
- VariableQuery.cs
- BasePattern.cs
- ReachPageContentSerializer.cs
- HtmlShim.cs
- Avt.cs
- TypeConverterAttribute.cs
- SqlMultiplexer.cs
- CodePageEncoding.cs
- MessageQueueAccessControlEntry.cs
- MonthChangedEventArgs.cs
- RelatedView.cs
- BindUriHelper.cs
- NumberFormatter.cs
- RTLAwareMessageBox.cs
- httpstaticobjectscollection.cs
- FontInfo.cs
- ToolStripManager.cs
- AutomationEventArgs.cs
- MethodAccessException.cs
- HandleRef.cs
- Function.cs
- UIElement.cs
- WmiEventSink.cs
- TaiwanCalendar.cs
- StoreItemCollection.cs
- UIElementHelper.cs
- BamlCollectionHolder.cs
- FrameworkContextData.cs
- Animatable.cs
- ToolStripDropDownClosedEventArgs.cs
- MultilineStringConverter.cs
- FileAuthorizationModule.cs
- CodeIndexerExpression.cs
- TableItemStyle.cs
- JulianCalendar.cs
- EntityClientCacheEntry.cs
- BypassElementCollection.cs
- FormViewRow.cs
- FormsAuthenticationCredentials.cs
- EdmConstants.cs
- SchemaElementDecl.cs
- FlowNode.cs
- FontStretches.cs
- EdgeProfileValidation.cs
- SecurityVerifiedMessage.cs
- PolicyValidationException.cs
- NotSupportedException.cs
- WebConfigurationHostFileChange.cs
- SevenBitStream.cs
- CodeNamespaceImportCollection.cs
- HitTestParameters.cs
- Pair.cs
- UnaryExpressionHelper.cs
- EntityDataSourceChangedEventArgs.cs
- XmlIterators.cs
- SqlUserDefinedAggregateAttribute.cs
- CodeBinaryOperatorExpression.cs
- TextDecorationCollection.cs
- Decorator.cs
- SafeNativeMethods.cs
- HashMembershipCondition.cs
- ImmutableDispatchRuntime.cs
- SettingsBase.cs
- Latin1Encoding.cs
- ComponentManagerBroker.cs
- CaseInsensitiveHashCodeProvider.cs
- DataGridViewImageCell.cs
- XmlReflectionMember.cs
- DocumentViewerBaseAutomationPeer.cs
- DiscardableAttribute.cs
- CqlParserHelpers.cs
- Composition.cs
- ObfuscationAttribute.cs
- DesignParameter.cs
- OracleParameterCollection.cs
- SynchronizedDispatch.cs
- Tuple.cs