Code:
/ DotNET / DotNET / 8.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
- TreeViewItemAutomationPeer.cs
- DataGridViewRow.cs
- GeneralTransform3DTo2DTo3D.cs
- ForAllOperator.cs
- EventWaitHandleSecurity.cs
- OpenTypeLayout.cs
- TextEffect.cs
- CodeArgumentReferenceExpression.cs
- RectangleConverter.cs
- OptimalTextSource.cs
- GridSplitterAutomationPeer.cs
- ChameleonKey.cs
- BooleanProjectedSlot.cs
- XPathException.cs
- ElasticEase.cs
- HandlerBase.cs
- CheckBoxStandardAdapter.cs
- CompilerError.cs
- SerializationFieldInfo.cs
- MouseButtonEventArgs.cs
- CalendarDataBindingHandler.cs
- TextEndOfLine.cs
- DelayedRegex.cs
- XmlReflectionImporter.cs
- DbProviderConfigurationHandler.cs
- TransformConverter.cs
- GlobalizationSection.cs
- Crc32.cs
- DBCommandBuilder.cs
- ClientApiGenerator.cs
- PeerResolverSettings.cs
- StateRuntime.cs
- XmlSchemaSimpleTypeRestriction.cs
- SecureEnvironment.cs
- HttpProcessUtility.cs
- GridViewPageEventArgs.cs
- UpdateTracker.cs
- WebConfigurationFileMap.cs
- MimeParameters.cs
- DeviceContext2.cs
- WebExceptionStatus.cs
- FaultCallbackWrapper.cs
- AuthenticationSection.cs
- DateTimeStorage.cs
- dbenumerator.cs
- TextEditorContextMenu.cs
- DBSqlParserTable.cs
- DecoderReplacementFallback.cs
- TextLineBreak.cs
- Label.cs
- TableRowCollection.cs
- ThrowHelper.cs
- RemotingServices.cs
- AggregateNode.cs
- PriorityBindingExpression.cs
- XmlSerializerVersionAttribute.cs
- CodeAttributeDeclarationCollection.cs
- ToggleButton.cs
- StickyNote.cs
- DecimalStorage.cs
- ConsumerConnectionPoint.cs
- FontNamesConverter.cs
- KeyTime.cs
- FileSystemInfo.cs
- WebPartEditorOkVerb.cs
- HostExecutionContextManager.cs
- PaintValueEventArgs.cs
- ClientEventManager.cs
- LinqDataSourceDeleteEventArgs.cs
- BamlTreeMap.cs
- SizeKeyFrameCollection.cs
- ActionFrame.cs
- DBAsyncResult.cs
- FacetChecker.cs
- ConfigurationLockCollection.cs
- FloatMinMaxAggregationOperator.cs
- FactorySettingsElement.cs
- CoTaskMemHandle.cs
- CookielessHelper.cs
- PrintDocument.cs
- CodeGeneratorOptions.cs
- PolyQuadraticBezierSegment.cs
- CompilationLock.cs
- SqlUDTStorage.cs
- EventSinkActivityDesigner.cs
- ExpandoObject.cs
- OverlappedAsyncResult.cs
- ListViewItemEventArgs.cs
- ProcessProtocolHandler.cs
- HttpRequest.cs
- StringUtil.cs
- SettingsAttributeDictionary.cs
- BaseResourcesBuildProvider.cs
- webclient.cs
- ReadOnlyAttribute.cs
- UpdateEventArgs.cs
- DesignerMetadata.cs
- DataServiceQuery.cs
- Annotation.cs
- DurableMessageDispatchInspector.cs