Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / EditorPartCollection.cs / 1305376 / EditorPartCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; 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); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlMembersMapping.cs
- DataService.cs
- NativeObjectSecurity.cs
- DefaultBinder.cs
- LoginStatusDesigner.cs
- Typeface.cs
- WorkflowMarkupSerializerMapping.cs
- StackOverflowException.cs
- Int64.cs
- ServiceDeploymentInfo.cs
- ImageField.cs
- ErrorView.xaml.cs
- HebrewNumber.cs
- FunctionMappingTranslator.cs
- PersistChildrenAttribute.cs
- DataDocumentXPathNavigator.cs
- CqlBlock.cs
- BinaryParser.cs
- GeneratedView.cs
- DataGridViewImageCell.cs
- AliasedSlot.cs
- AspNetSynchronizationContext.cs
- ListBase.cs
- ToolBarButton.cs
- DateTimeValueSerializer.cs
- WithParamAction.cs
- KeyGesture.cs
- ObjectItemLoadingSessionData.cs
- Matrix.cs
- SqlRowUpdatedEvent.cs
- PrintingPermission.cs
- RbTree.cs
- EdmSchemaAttribute.cs
- GridSplitter.cs
- BamlReader.cs
- NativeMethods.cs
- InstancePersistenceException.cs
- ControlCollection.cs
- PerspectiveCamera.cs
- SplineQuaternionKeyFrame.cs
- TransformerInfo.cs
- GradientBrush.cs
- PolicyException.cs
- Accessible.cs
- FunctionParameter.cs
- RequestResizeEvent.cs
- TypeFieldSchema.cs
- XXXOnTypeBuilderInstantiation.cs
- SerialPinChanges.cs
- StringFreezingAttribute.cs
- IPipelineRuntime.cs
- SqlXml.cs
- PersistStreamTypeWrapper.cs
- TextRangeEditTables.cs
- HebrewCalendar.cs
- AlignmentYValidation.cs
- DetailsViewAutoFormat.cs
- _AutoWebProxyScriptEngine.cs
- UIElementPropertyUndoUnit.cs
- Tracer.cs
- FontResourceCache.cs
- ConstraintConverter.cs
- ConnectionPoint.cs
- PopupRoot.cs
- UriParserTemplates.cs
- CodeSnippetTypeMember.cs
- TypeToken.cs
- NullableLongAverageAggregationOperator.cs
- OpenFileDialog.cs
- InstancePersistence.cs
- WorkflowDesignerMessageFilter.cs
- TabItemAutomationPeer.cs
- ICspAsymmetricAlgorithm.cs
- SmiRecordBuffer.cs
- Panel.cs
- FontDialog.cs
- ColumnPropertiesGroup.cs
- MasterPageCodeDomTreeGenerator.cs
- ConfigXmlElement.cs
- CompoundFileDeflateTransform.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- XPathConvert.cs
- ToolStripGrip.cs
- PropertyToken.cs
- XmlSchemaComplexContent.cs
- HttpWebRequestElement.cs
- TripleDESCryptoServiceProvider.cs
- PointAnimationUsingKeyFrames.cs
- ObjectContextServiceProvider.cs
- _CookieModule.cs
- VirtualPathProvider.cs
- TokenBasedSetEnumerator.cs
- RowToParametersTransformer.cs
- Attributes.cs
- SessionParameter.cs
- Variable.cs
- RealizationContext.cs
- DivideByZeroException.cs
- GeneralTransform3DGroup.cs
- CalloutQueueItem.cs