Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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 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. //------------------------------------------------------------------------------ //// 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 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ObjectAnimationUsingKeyFrames.cs
- BaseTemplateParser.cs
- ControlDesigner.cs
- TypeDependencyAttribute.cs
- HwndHostAutomationPeer.cs
- RoleGroup.cs
- DesignConnectionCollection.cs
- PasswordBoxAutomationPeer.cs
- UnionCodeGroup.cs
- validationstate.cs
- X509AudioLogo.cs
- JsonByteArrayDataContract.cs
- CacheEntry.cs
- XslTransform.cs
- QueryNode.cs
- SiteMembershipCondition.cs
- Win32PrintDialog.cs
- EditorServiceContext.cs
- AliasExpr.cs
- CharUnicodeInfo.cs
- DataRowCollection.cs
- TextEditorSpelling.cs
- PasswordTextNavigator.cs
- ConnectionStringEditor.cs
- RC2.cs
- PolyQuadraticBezierSegment.cs
- HighlightVisual.cs
- SelectorItemAutomationPeer.cs
- ConfigurationPropertyCollection.cs
- FloaterBaseParagraph.cs
- OperationPerformanceCounters.cs
- StretchValidation.cs
- DataKeyCollection.cs
- CreateUserWizardStep.cs
- NavigationService.cs
- DPTypeDescriptorContext.cs
- UidManager.cs
- Vector3DCollection.cs
- TriggerActionCollection.cs
- HotSpotCollection.cs
- StringReader.cs
- WebServiceErrorEvent.cs
- ColumnBinding.cs
- ClientSettingsStore.cs
- TreeNodeClickEventArgs.cs
- SecurityHelper.cs
- WorkflowOwnerAsyncResult.cs
- ToolBarButtonClickEvent.cs
- XmlValueConverter.cs
- GridViewDesigner.cs
- SolidColorBrush.cs
- TraceListeners.cs
- VideoDrawing.cs
- MultiDataTrigger.cs
- X509ChainElement.cs
- ImageMap.cs
- UnaryOperationBinder.cs
- FixedSOMPage.cs
- VideoDrawing.cs
- PropertyDescriptorCollection.cs
- BrowsableAttribute.cs
- ResumeStoryboard.cs
- PerformanceCounterPermissionEntryCollection.cs
- TableLayoutStyle.cs
- DataKey.cs
- ExpressionConverter.cs
- EventProxy.cs
- BamlTreeMap.cs
- ReadOnlyDataSource.cs
- GlyphElement.cs
- ContainerSelectorBehavior.cs
- TreeNodeStyle.cs
- SamlAssertionKeyIdentifierClause.cs
- HandlerBase.cs
- linebase.cs
- DataColumnCollection.cs
- ListViewItem.cs
- CodeAttributeDeclarationCollection.cs
- CLSCompliantAttribute.cs
- TeredoHelper.cs
- DataControlLinkButton.cs
- RegexTree.cs
- SHA256.cs
- FormConverter.cs
- KnownTypes.cs
- QualificationDataAttribute.cs
- BaseDataList.cs
- Zone.cs
- SctClaimSerializer.cs
- FileUtil.cs
- _TLSstream.cs
- ListManagerBindingsCollection.cs
- AdRotator.cs
- DataGridViewMethods.cs
- ValueUtilsSmi.cs
- InputManager.cs
- FamilyTypefaceCollection.cs
- PenLineJoinValidation.cs
- DependentList.cs
- TypeToArgumentTypeConverter.cs