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
- SizeLimitedCache.cs
- LoginName.cs
- WhitespaceSignificantCollectionAttribute.cs
- Subset.cs
- RouteCollection.cs
- SqlClientWrapperSmiStreamChars.cs
- DoubleStorage.cs
- DebugInfoGenerator.cs
- HostingEnvironmentSection.cs
- PasswordBoxAutomationPeer.cs
- TransformationRules.cs
- SimpleLine.cs
- AssociativeAggregationOperator.cs
- MenuItemBinding.cs
- IPHostEntry.cs
- DataGridItemAutomationPeer.cs
- DynamicMethod.cs
- SpeechSynthesizer.cs
- DynamicDocumentPaginator.cs
- SecurityNegotiationException.cs
- RequestResizeEvent.cs
- DataTablePropertyDescriptor.cs
- DataGridViewButtonColumn.cs
- KeyInstance.cs
- SqlMethodAttribute.cs
- CngAlgorithm.cs
- Section.cs
- AttributeSetAction.cs
- ApplicationId.cs
- Visual3DCollection.cs
- FormViewDeletedEventArgs.cs
- ImportOptions.cs
- StreamGeometry.cs
- BlurEffect.cs
- ConstructorExpr.cs
- SchemaTableColumn.cs
- ScriptMethodAttribute.cs
- DesignBindingPicker.cs
- Rect.cs
- FontWeightConverter.cs
- PolicyDesigner.cs
- VisualProxy.cs
- ActivityInstance.cs
- SqlAliaser.cs
- ConfigurationErrorsException.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- XmlNodeList.cs
- HtmlLinkAdapter.cs
- StylusTip.cs
- ScrollChrome.cs
- ElementAtQueryOperator.cs
- ProviderUtil.cs
- TrustSection.cs
- PropertyPathConverter.cs
- RedistVersionInfo.cs
- HotCommands.cs
- RegistrationServices.cs
- AspNetHostingPermission.cs
- DataGridHelper.cs
- PlainXmlSerializer.cs
- MaskedTextBox.cs
- HtmlWindow.cs
- WebPartEditVerb.cs
- MergeFilterQuery.cs
- TripleDESCryptoServiceProvider.cs
- EntryPointNotFoundException.cs
- MbpInfo.cs
- GeneralTransformGroup.cs
- ApplicationSettingsBase.cs
- SyndicationDeserializer.cs
- ModulesEntry.cs
- DocumentXmlWriter.cs
- Style.cs
- PageTheme.cs
- DisplayInformation.cs
- BaseComponentEditor.cs
- MarkupWriter.cs
- NamedPipeTransportElement.cs
- RoutedEvent.cs
- CancellationTokenSource.cs
- Profiler.cs
- AppSettingsSection.cs
- Facet.cs
- ProviderUtil.cs
- KnownAssemblyEntry.cs
- GridViewRowEventArgs.cs
- BindingNavigator.cs
- BeginStoryboard.cs
- SourceElementsCollection.cs
- HwndSource.cs
- HeaderCollection.cs
- HtmlTable.cs
- ISO2022Encoding.cs
- EdmScalarPropertyAttribute.cs
- WebPartDisplayMode.cs
- TextWriterTraceListener.cs
- ContentControl.cs
- OwnerDrawPropertyBag.cs
- Point.cs
- DurationConverter.cs