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
- UserUseLicenseDictionaryLoader.cs
- OpenTypeCommon.cs
- UpdatableGenericsFeature.cs
- ThemeDictionaryExtension.cs
- WriteFileContext.cs
- Int32RectValueSerializer.cs
- MimeMapping.cs
- SecurityAlgorithmSuiteConverter.cs
- WebContext.cs
- WebPartDisplayMode.cs
- ZeroOpNode.cs
- TemplateBindingExpression.cs
- DataSourceCache.cs
- SqlDataReader.cs
- QualifiedId.cs
- UnionCodeGroup.cs
- UnsafeNetInfoNativeMethods.cs
- Vector.cs
- PropertyConverter.cs
- Soap.cs
- DrawListViewSubItemEventArgs.cs
- Margins.cs
- PrintDialog.cs
- DBPropSet.cs
- GridViewItemAutomationPeer.cs
- SchemaObjectWriter.cs
- GeneralTransform3DGroup.cs
- EncoderFallback.cs
- Enum.cs
- MetadataWorkspace.cs
- ReadOnlyDictionary.cs
- DecoratedNameAttribute.cs
- Light.cs
- AsyncOperationManager.cs
- DotAtomReader.cs
- BindingGraph.cs
- PropertyInformation.cs
- RelationshipNavigation.cs
- Regex.cs
- ListSortDescription.cs
- PointLight.cs
- AssemblyName.cs
- DtcInterfaces.cs
- LazyTextWriterCreator.cs
- ParameterCollection.cs
- DbgCompiler.cs
- GridViewCancelEditEventArgs.cs
- RequestCachePolicy.cs
- EntityCollectionChangedParams.cs
- ButtonPopupAdapter.cs
- ParameterCollection.cs
- ClientSession.cs
- DeclaredTypeElementCollection.cs
- SecurityElement.cs
- XamlSerializerUtil.cs
- CodeIndexerExpression.cs
- OTFRasterizer.cs
- CodeObjectCreateExpression.cs
- XAMLParseException.cs
- GenericRootAutomationPeer.cs
- XPathSelfQuery.cs
- FaultDesigner.cs
- SkinIDTypeConverter.cs
- Vector.cs
- BindingBase.cs
- LookupNode.cs
- WebPartZoneBase.cs
- _AutoWebProxyScriptHelper.cs
- BitmapEffectvisualstate.cs
- FormConverter.cs
- DateTimeFormat.cs
- DataList.cs
- CleanUpVirtualizedItemEventArgs.cs
- NavigationPropertyAccessor.cs
- ProcessActivityTreeOptions.cs
- RenderTargetBitmap.cs
- EncoderReplacementFallback.cs
- DataSourceCache.cs
- Tuple.cs
- ThemeableAttribute.cs
- OrderedDictionaryStateHelper.cs
- JournalEntry.cs
- Cursor.cs
- SqlGatherConsumedAliases.cs
- FilterQueryOptionExpression.cs
- DescendantQuery.cs
- PointValueSerializer.cs
- Brush.cs
- TrackBar.cs
- SplashScreen.cs
- LinqExpressionNormalizer.cs
- MenuItem.cs
- XPathNode.cs
- SmiGettersStream.cs
- JournalNavigationScope.cs
- HandlerBase.cs
- ProxyWebPartManager.cs
- TableHeaderCell.cs
- XmlWrappingWriter.cs
- PointCollection.cs