Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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 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); } } } } } // 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
- Enum.cs
- CommonObjectSecurity.cs
- BuildProviderInstallComponent.cs
- invalidudtexception.cs
- CornerRadius.cs
- LicFileLicenseProvider.cs
- FileBasedResourceGroveler.cs
- XPathException.cs
- JoinElimination.cs
- ButtonBase.cs
- ThousandthOfEmRealDoubles.cs
- ProcessProtocolHandler.cs
- Pick.cs
- SafeNativeMethods.cs
- TextEditorSpelling.cs
- ConditionalExpression.cs
- ListControl.cs
- IPipelineRuntime.cs
- ImmComposition.cs
- AssociationType.cs
- BasicViewGenerator.cs
- InternalConfigHost.cs
- DataRelationCollection.cs
- PointLightBase.cs
- OpenTypeLayout.cs
- AliasedExpr.cs
- ActiveXHost.cs
- ControlDesigner.cs
- ConfigurationStrings.cs
- XsdDateTime.cs
- MailDefinition.cs
- TimeSpanConverter.cs
- MultiAsyncResult.cs
- UpdateTracker.cs
- XmlCharacterData.cs
- DataRowView.cs
- TypeSystemHelpers.cs
- LocalizableResourceBuilder.cs
- BaseValidator.cs
- ExternalException.cs
- DataSourceHelper.cs
- GenericUriParser.cs
- ImageFormatConverter.cs
- XPathQilFactory.cs
- SystemIPGlobalStatistics.cs
- ImmutableObjectAttribute.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- RightsManagementEncryptionTransform.cs
- ConstructorBuilder.cs
- Pen.cs
- TextParaLineResult.cs
- DocumentGridPage.cs
- SafePEFileHandle.cs
- Section.cs
- IriParsingElement.cs
- Registry.cs
- DataBoundControl.cs
- StoreContentChangedEventArgs.cs
- RequestTimeoutManager.cs
- DataServiceConfiguration.cs
- NTAccount.cs
- ErrorStyle.cs
- PeerTransportElement.cs
- VectorKeyFrameCollection.cs
- SiteMembershipCondition.cs
- WebPartManager.cs
- DecoderReplacementFallback.cs
- AuthenticationService.cs
- StreamInfo.cs
- FactoryGenerator.cs
- AcceleratedTokenProviderState.cs
- SQLMoney.cs
- CodeCastExpression.cs
- DisplayNameAttribute.cs
- SQLDouble.cs
- GetWorkflowTree.cs
- RtfFormatStack.cs
- TreeViewItemAutomationPeer.cs
- ColorBlend.cs
- BehaviorEditorPart.cs
- CounterCreationDataConverter.cs
- CombinedGeometry.cs
- LineInfo.cs
- FormView.cs
- rsa.cs
- ClosableStream.cs
- PropertySegmentSerializer.cs
- SqlProvider.cs
- CheckBoxRenderer.cs
- BitmapEffectState.cs
- FormViewDeleteEventArgs.cs
- IsolatedStorageFile.cs
- ParentQuery.cs
- sqlnorm.cs
- DbConnectionPoolCounters.cs
- HttpModule.cs
- InstanceDescriptor.cs
- MobileCategoryAttribute.cs
- FormCollection.cs
- StrokeCollectionConverter.cs