Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SessionParameter.cs
- DataColumnChangeEvent.cs
- SafeFindHandle.cs
- CompModSwitches.cs
- WindowCollection.cs
- ColumnMap.cs
- ValueType.cs
- TemplateEditingVerb.cs
- PartBasedPackageProperties.cs
- DataGridPageChangedEventArgs.cs
- SqlColumnizer.cs
- Psha1DerivedKeyGenerator.cs
- NativeMethods.cs
- Matrix3DStack.cs
- SineEase.cs
- IPGlobalProperties.cs
- DataGridViewColumn.cs
- UpdatePanelTrigger.cs
- ChangeDirector.cs
- DrawingBrush.cs
- MessageBox.cs
- ClientEventManager.cs
- PasswordRecovery.cs
- TrackingQuery.cs
- WebPartDisplayModeCollection.cs
- SecurityManager.cs
- Column.cs
- AesCryptoServiceProvider.cs
- HtmlControlDesigner.cs
- AttachedPropertyBrowsableAttribute.cs
- LabelExpression.cs
- StyleBamlTreeBuilder.cs
- ProcessModelInfo.cs
- ResourceProviderFactory.cs
- PageClientProxyGenerator.cs
- EntityViewGenerationAttribute.cs
- SqlMethodCallConverter.cs
- SqlProcedureAttribute.cs
- ZoneMembershipCondition.cs
- QueueException.cs
- ConfigurationElementProperty.cs
- TreeNodeStyle.cs
- WizardStepBase.cs
- DictionaryMarkupSerializer.cs
- ProcessHostConfigUtils.cs
- TableAdapterManagerMethodGenerator.cs
- WindowsScrollBar.cs
- SocketException.cs
- BridgeDataRecord.cs
- WebPartsPersonalization.cs
- DropTarget.cs
- StdValidatorsAndConverters.cs
- UrlPath.cs
- CFStream.cs
- OracleTransaction.cs
- NativeMethods.cs
- XPathNodePointer.cs
- QualifiedCellIdBoolean.cs
- CheckBoxBaseAdapter.cs
- FragmentNavigationEventArgs.cs
- FlowLayoutPanel.cs
- ListViewHitTestInfo.cs
- JsonFormatWriterGenerator.cs
- CodePageUtils.cs
- CheckBox.cs
- XamlRtfConverter.cs
- RuntimeDelegateArgument.cs
- Converter.cs
- ProcessThreadCollection.cs
- EventBookmark.cs
- PageCodeDomTreeGenerator.cs
- SID.cs
- SafeHandles.cs
- GestureRecognitionResult.cs
- PreviewPageInfo.cs
- ChineseLunisolarCalendar.cs
- X509CertificateChain.cs
- PermissionToken.cs
- TokenBasedSetEnumerator.cs
- CodeDomSerializerBase.cs
- LoadItemsEventArgs.cs
- XmlTextReaderImplHelpers.cs
- CanonicalFontFamilyReference.cs
- MergeFailedEvent.cs
- WebBrowserPermission.cs
- UserMapPath.cs
- TranslateTransform.cs
- Label.cs
- ResourceWriter.cs
- Attribute.cs
- DefaultObjectMappingItemCollection.cs
- SingleAnimation.cs
- RawTextInputReport.cs
- SharedConnectionListener.cs
- WebConfigManager.cs
- XLinq.cs
- TableRow.cs
- ReferenceConverter.cs
- VerificationAttribute.cs
- ZipIOExtraFieldElement.cs