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
- UnionCodeGroup.cs
- MetadataException.cs
- _ListenerResponseStream.cs
- TextReader.cs
- InputLangChangeRequestEvent.cs
- HeaderedItemsControl.cs
- SmtpClient.cs
- PrintPreviewGraphics.cs
- HtmlInputButton.cs
- LoginName.cs
- ShapingEngine.cs
- AttributeQuery.cs
- EntityDataSourceContextCreatedEventArgs.cs
- GridPattern.cs
- Line.cs
- XmlHierarchicalDataSourceView.cs
- KeyFrames.cs
- Dynamic.cs
- WorkItem.cs
- MachineKeySection.cs
- AtomMaterializer.cs
- FormatConvertedBitmap.cs
- path.cs
- Base64Decoder.cs
- Axis.cs
- DESCryptoServiceProvider.cs
- UnsafeNativeMethods.cs
- Wrapper.cs
- AsyncStreamReader.cs
- Token.cs
- ArcSegment.cs
- GradientStopCollection.cs
- XmlComment.cs
- DataListCommandEventArgs.cs
- TabControlDesigner.cs
- HttpModulesSection.cs
- SessionStateContainer.cs
- XmlILCommand.cs
- PreviewPrintController.cs
- UnsafeNativeMethods.cs
- DoubleLinkList.cs
- AffineTransform3D.cs
- DrawingImage.cs
- ScriptComponentDescriptor.cs
- ConfigurationValidatorAttribute.cs
- RSAPKCS1SignatureDeformatter.cs
- StaticExtensionConverter.cs
- GridViewRowPresenterBase.cs
- CounterSet.cs
- XmlSchemas.cs
- xml.cs
- InputLangChangeEvent.cs
- Overlapped.cs
- OleDbEnumerator.cs
- LoadedEvent.cs
- ErrorWrapper.cs
- DataFieldCollectionEditor.cs
- _NativeSSPI.cs
- EnumBuilder.cs
- Trace.cs
- X509PeerCertificateAuthentication.cs
- StorageAssociationTypeMapping.cs
- Tablet.cs
- TableLayoutPanelCellPosition.cs
- ExpressionCopier.cs
- FileDialog_Vista_Interop.cs
- ScrollBar.cs
- PropertyChangeTracker.cs
- NullableLongMinMaxAggregationOperator.cs
- ExtractedStateEntry.cs
- TypeBuilderInstantiation.cs
- XPathDocumentNavigator.cs
- ForwardPositionQuery.cs
- RegexTree.cs
- serverconfig.cs
- ProtocolsConfiguration.cs
- RegisteredHiddenField.cs
- Model3DGroup.cs
- ClonableStack.cs
- TextDecorationCollection.cs
- SqlIdentifier.cs
- DataGridViewComboBoxCell.cs
- ClaimComparer.cs
- QilFactory.cs
- FlowLayout.cs
- ReadOnlyCollectionBase.cs
- ActivityCollectionMarkupSerializer.cs
- ProfileProvider.cs
- SQLByteStorage.cs
- WindowsSidIdentity.cs
- SystemWebCachingSectionGroup.cs
- ViewStateException.cs
- EventLogWatcher.cs
- SymbolMethod.cs
- Converter.cs
- TextElementCollection.cs
- JavaScriptObjectDeserializer.cs
- WindowsFormsLinkLabel.cs
- TrackPoint.cs
- XmlSchemaComplexContent.cs