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
- AesManaged.cs
- RadialGradientBrush.cs
- DesignerAutoFormatStyle.cs
- InputProcessorProfilesLoader.cs
- CompModHelpers.cs
- ProfileGroupSettings.cs
- HandlerFactoryCache.cs
- JsonCollectionDataContract.cs
- MonitoringDescriptionAttribute.cs
- PrintEvent.cs
- ReflectionPermission.cs
- TypeSemantics.cs
- EastAsianLunisolarCalendar.cs
- FocusChangedEventArgs.cs
- ExceptionValidationRule.cs
- ManifestResourceInfo.cs
- CodeIdentifiers.cs
- TextTreeTextElementNode.cs
- IdentityHolder.cs
- WebPartEditorApplyVerb.cs
- HtmlElementCollection.cs
- Span.cs
- SchemaNotation.cs
- DragDeltaEventArgs.cs
- XamlSerializerUtil.cs
- UTF7Encoding.cs
- HitTestWithPointDrawingContextWalker.cs
- BindStream.cs
- ServiceHttpModule.cs
- EntityDataSourceColumn.cs
- GenericsInstances.cs
- BaseDataBoundControl.cs
- FtpCachePolicyElement.cs
- CalendarTable.cs
- XmlSiteMapProvider.cs
- AlignmentXValidation.cs
- AssertSection.cs
- XmlAttributeCache.cs
- Section.cs
- XAMLParseException.cs
- DomainUpDown.cs
- View.cs
- X509Certificate2Collection.cs
- IImplicitResourceProvider.cs
- InkCanvasFeedbackAdorner.cs
- RelationshipDetailsRow.cs
- IndexOutOfRangeException.cs
- XmlWriterTraceListener.cs
- RbTree.cs
- AuthenticationConfig.cs
- JournalNavigationScope.cs
- PcmConverter.cs
- WindowsScrollBar.cs
- DropShadowBitmapEffect.cs
- TdsParserSessionPool.cs
- PreloadedPackages.cs
- ParseElement.cs
- _MultipleConnectAsync.cs
- PartialArray.cs
- IteratorDescriptor.cs
- ScriptResourceAttribute.cs
- DeadCharTextComposition.cs
- AttributeCollection.cs
- ExceptionHandlers.cs
- CompiledIdentityConstraint.cs
- FormatterConverter.cs
- SmtpClient.cs
- Utils.cs
- OleDbConnectionInternal.cs
- InProcStateClientManager.cs
- sqlnorm.cs
- SafeNativeMethodsOther.cs
- HtmlFormParameterReader.cs
- Polygon.cs
- MemberRelationshipService.cs
- HandleTable.cs
- XmlWhitespace.cs
- SqlReferenceCollection.cs
- DomainUpDown.cs
- LineProperties.cs
- FixedTextPointer.cs
- InstanceLockedException.cs
- ValidationHelper.cs
- PartitionerQueryOperator.cs
- ThreadExceptionEvent.cs
- XsltCompileContext.cs
- AppSettingsSection.cs
- WithStatement.cs
- DataSourceHelper.cs
- SQLDateTime.cs
- Font.cs
- DataServiceProviderWrapper.cs
- BitHelper.cs
- ServerIdentity.cs
- ValidationSummaryDesigner.cs
- DbTypeMap.cs
- PolicyUtility.cs
- XslVisitor.cs
- SiteMapHierarchicalDataSourceView.cs
- CheckBoxFlatAdapter.cs