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
- Stackframe.cs
- ClientFormsAuthenticationCredentials.cs
- IdentityReference.cs
- RadioButton.cs
- SharedDp.cs
- RegexParser.cs
- bindurihelper.cs
- WinFormsSpinner.cs
- GeneralTransform.cs
- Point3DAnimationBase.cs
- CustomTypeDescriptor.cs
- SpecialTypeDataContract.cs
- ToolboxItemLoader.cs
- UrlPropertyAttribute.cs
- SqlExpressionNullability.cs
- SmiEventSink_DeferedProcessing.cs
- CqlParser.cs
- DataRowComparer.cs
- KeyPullup.cs
- ProcessModelSection.cs
- brushes.cs
- UriTemplate.cs
- Dictionary.cs
- HtmlElementCollection.cs
- HttpStreams.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- Sentence.cs
- SqlInfoMessageEvent.cs
- Clipboard.cs
- Classification.cs
- Decorator.cs
- SolidColorBrush.cs
- SmiMetaDataProperty.cs
- DataFormat.cs
- TextSchema.cs
- RSAOAEPKeyExchangeDeformatter.cs
- SqlColumnizer.cs
- Propagator.JoinPropagator.JoinPredicateVisitor.cs
- TextEffectCollection.cs
- ScrollProviderWrapper.cs
- TextSelection.cs
- HttpContextWrapper.cs
- AuthenticationModuleElement.cs
- ObjectHandle.cs
- PointAnimationBase.cs
- WindowsFormsHostAutomationPeer.cs
- HttpCookieCollection.cs
- PickBranch.cs
- PassportAuthenticationModule.cs
- AssemblyNameUtility.cs
- GeneratedView.cs
- TreeViewImageIndexConverter.cs
- LineVisual.cs
- UserNamePasswordValidator.cs
- TextFormatterImp.cs
- RecognizedAudio.cs
- ObjectCacheHost.cs
- RichTextBoxConstants.cs
- recordstatefactory.cs
- ComponentManagerBroker.cs
- ISAPIRuntime.cs
- WebConfigurationManager.cs
- RoleGroupCollection.cs
- GraphicsContainer.cs
- EventManager.cs
- EventPropertyMap.cs
- DaylightTime.cs
- ChineseLunisolarCalendar.cs
- SqlDependencyListener.cs
- Encoder.cs
- BindingsCollection.cs
- BitmapEffectInputData.cs
- LogReserveAndAppendState.cs
- counter.cs
- SystemColors.cs
- OperationExecutionFault.cs
- ReceiveParametersContent.cs
- CompatibleComparer.cs
- FontStretches.cs
- ProgressBarHighlightConverter.cs
- ListDesigner.cs
- Evidence.cs
- Decimal.cs
- TdsEnums.cs
- RelativeSource.cs
- AudioFormatConverter.cs
- GridViewDeletedEventArgs.cs
- FilterQuery.cs
- BamlStream.cs
- GridViewRowEventArgs.cs
- ReferentialConstraint.cs
- ApplicationId.cs
- UndoManager.cs
- Model3D.cs
- FontStyle.cs
- PolicyLevel.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- DataGridViewCellCancelEventArgs.cs
- FillRuleValidation.cs
- LayoutEvent.cs