Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / UI / WebParts / EditorPartCollection.cs / 1 / EditorPartCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Security.Permissions; [AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] public sealed class EditorPartCollection : ReadOnlyCollectionBase { public static readonly EditorPartCollection Empty = new EditorPartCollection(); public EditorPartCollection() { } public EditorPartCollection(ICollection editorParts) { Initialize(null, editorParts); } public EditorPartCollection(EditorPartCollection existingEditorParts, ICollection editorParts) { Initialize(existingEditorParts, editorParts); } public EditorPart this[int index] { get { return (EditorPart) InnerList[index]; } } internal int Add(EditorPart value) { return InnerList.Add(value); } public bool Contains(EditorPart editorPart) { return InnerList.Contains(editorPart); } public void CopyTo(EditorPart[] array, int index) { InnerList.CopyTo(array, index); } public int IndexOf(EditorPart editorPart) { return InnerList.IndexOf(editorPart); } private void Initialize(EditorPartCollection existingEditorParts, ICollection editorParts) { if (existingEditorParts != null) { foreach (EditorPart existingEditorPart in existingEditorParts) { // Don't need to check arg, since we know it is valid since it came // from an EditorPartCollection. InnerList.Add(existingEditorPart); } } if (editorParts != null) { foreach (object obj in editorParts) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "editorParts"); } if (!(obj is EditorPart)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "EditorPart"), "editorParts"); } InnerList.Add(obj); } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MembershipAdapter.cs
- xml.cs
- CodeExpressionCollection.cs
- ApplicationSecurityManager.cs
- DataControlFieldHeaderCell.cs
- CharacterHit.cs
- ZipIOExtraFieldPaddingElement.cs
- ParallelRangeManager.cs
- OdbcDataAdapter.cs
- Canvas.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ArgumentException.cs
- ExceptionHandlersDesigner.cs
- ObjectManager.cs
- TripleDES.cs
- connectionpool.cs
- IProvider.cs
- SchemaMapping.cs
- ObfuscateAssemblyAttribute.cs
- ObjectStateFormatter.cs
- BuildResultCache.cs
- QilExpression.cs
- PageWrapper.cs
- ConfigurationLoader.cs
- PermissionListSet.cs
- ContainerFilterService.cs
- StyleTypedPropertyAttribute.cs
- RtfToken.cs
- TryExpression.cs
- AspNetHostingPermission.cs
- StringBlob.cs
- Ray3DHitTestResult.cs
- BasePattern.cs
- SqlCharStream.cs
- DeploymentSection.cs
- Invariant.cs
- NavigationWindowAutomationPeer.cs
- SettingsPropertyNotFoundException.cs
- RotationValidation.cs
- ExpressionBuilder.cs
- XPathChildIterator.cs
- WindowsClientCredential.cs
- SqlBulkCopyColumnMapping.cs
- ImplicitInputBrush.cs
- CustomAttributeSerializer.cs
- DesignSurfaceCollection.cs
- ModuleElement.cs
- HttpRawResponse.cs
- Argument.cs
- AssemblyBuilder.cs
- DbTransaction.cs
- InternalResources.cs
- regiisutil.cs
- XPathNavigatorKeyComparer.cs
- UnsupportedPolicyOptionsException.cs
- HtmlElement.cs
- DetailsViewDeletedEventArgs.cs
- InstanceStore.cs
- JournalNavigationScope.cs
- Comparer.cs
- SQLDecimal.cs
- TreeViewBindingsEditorForm.cs
- XmlAutoDetectWriter.cs
- XpsS0ValidatingLoader.cs
- BrowserCapabilitiesFactoryBase.cs
- ActivationServices.cs
- TimeSpan.cs
- CompareValidator.cs
- CallbackTimeoutsBehavior.cs
- WindowsListViewItem.cs
- SettingsPropertyValueCollection.cs
- CSharpCodeProvider.cs
- WSSecurityOneDotOneReceiveSecurityHeader.cs
- WarningException.cs
- EDesignUtil.cs
- ColumnWidthChangingEvent.cs
- ChannelDispatcherBase.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ScalarConstant.cs
- dtdvalidator.cs
- DnsEndPoint.cs
- AutoGeneratedField.cs
- TabletDeviceInfo.cs
- MessageQueueCriteria.cs
- ValidatedControlConverter.cs
- httpapplicationstate.cs
- TouchDevice.cs
- Blend.cs
- ActiveDocumentEvent.cs
- MetaModel.cs
- ApplicationActivator.cs
- ObjectCacheHost.cs
- CreateWorkflowOwnerCommand.cs
- SiteMapDataSourceView.cs
- RewritingProcessor.cs
- BamlCollectionHolder.cs
- TailPinnedEventArgs.cs
- Listener.cs
- DataGridViewHitTestInfo.cs
- XmlSchemaInfo.cs