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
- CodeDOMProvider.cs
- QuotaThrottle.cs
- InstalledFontCollection.cs
- UInt32.cs
- TextBox.cs
- TextPatternIdentifiers.cs
- LeftCellWrapper.cs
- RawContentTypeMapper.cs
- BamlRecordHelper.cs
- ChangeBlockUndoRecord.cs
- RoutedPropertyChangedEventArgs.cs
- HttpWebResponse.cs
- FunctionCommandText.cs
- OdbcEnvironment.cs
- WindowsUpDown.cs
- SystemThemeKey.cs
- Encoder.cs
- BrushConverter.cs
- ComponentConverter.cs
- DeleteMemberBinder.cs
- SerializationInfo.cs
- DiscardableAttribute.cs
- IPEndPointCollection.cs
- ExpressionEditorAttribute.cs
- DivideByZeroException.cs
- TrailingSpaceComparer.cs
- ReaderContextStackData.cs
- ThicknessConverter.cs
- FormsAuthenticationUserCollection.cs
- CacheOutputQuery.cs
- DataControlCommands.cs
- RootBrowserWindow.cs
- FeatureAttribute.cs
- ExtendedPropertyDescriptor.cs
- MessageSmuggler.cs
- TransportConfigurationTypeElement.cs
- Vertex.cs
- FixedSOMTableRow.cs
- TcpProcessProtocolHandler.cs
- ConfigurationElementCollection.cs
- FullTextBreakpoint.cs
- RecognitionEventArgs.cs
- CounterNameConverter.cs
- HttpProfileBase.cs
- ClientTarget.cs
- MissingMethodException.cs
- TransportConfigurationTypeElementCollection.cs
- NullableIntAverageAggregationOperator.cs
- FileDataSourceCache.cs
- Cursor.cs
- ModifierKeysConverter.cs
- StylusPointCollection.cs
- AutomationAttributeInfo.cs
- Model3DCollection.cs
- RectangleConverter.cs
- EntityTypeEmitter.cs
- MultipleViewPattern.cs
- sqlnorm.cs
- XmlFormatReaderGenerator.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- EncryptedData.cs
- CallSiteBinder.cs
- CqlLexerHelpers.cs
- ResourceDescriptionAttribute.cs
- PartialClassGenerationTask.cs
- DecoderFallbackWithFailureFlag.cs
- PauseStoryboard.cs
- SurrogateEncoder.cs
- ListViewPagedDataSource.cs
- ModelUIElement3D.cs
- CookieParameter.cs
- Hash.cs
- TransformerInfoCollection.cs
- ProfileEventArgs.cs
- ContentDisposition.cs
- CodeSubDirectory.cs
- ListBoxDesigner.cs
- SqlDependencyUtils.cs
- CheckedPointers.cs
- HashCodeCombiner.cs
- CodeNamespaceImport.cs
- LoginDesignerUtil.cs
- X509SubjectKeyIdentifierClause.cs
- X509Certificate2Collection.cs
- WorkflowApplicationEventArgs.cs
- ChtmlTextWriter.cs
- CodeTryCatchFinallyStatement.cs
- XmlSchemaSet.cs
- CellCreator.cs
- TCPListener.cs
- ResourceBinder.cs
- StandardMenuStripVerb.cs
- XmlNodeChangedEventManager.cs
- StringComparer.cs
- TimerElapsedEvenArgs.cs
- NotFiniteNumberException.cs
- ObjectPropertyMapping.cs
- HierarchicalDataSourceConverter.cs
- CachedPathData.cs
- SortDescription.cs