Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / 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. //------------------------------------------------------------------------------ //// 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
- RequestUriProcessor.cs
- _SecureChannel.cs
- AggregateNode.cs
- UnsafeNativeMethods.cs
- Profiler.cs
- TraceSection.cs
- XPathQueryGenerator.cs
- PropertyValueChangedEvent.cs
- ReflectEventDescriptor.cs
- HtmlControlPersistable.cs
- AppModelKnownContentFactory.cs
- ForeignKeyConstraint.cs
- DataGridItemEventArgs.cs
- HwndSource.cs
- IProvider.cs
- SortedDictionary.cs
- ReadOnlyCollectionBase.cs
- SiteMembershipCondition.cs
- SqlNotificationRequest.cs
- DocumentGridContextMenu.cs
- SdlChannelSink.cs
- Visitor.cs
- MessageFormatterConverter.cs
- HttpFileCollectionWrapper.cs
- FastEncoderStatics.cs
- BasicExpressionVisitor.cs
- DataReaderContainer.cs
- CompositeDispatchFormatter.cs
- GreenMethods.cs
- NaturalLanguageHyphenator.cs
- ServiceHttpModule.cs
- SystemDiagnosticsSection.cs
- WebPartRestoreVerb.cs
- EdmToObjectNamespaceMap.cs
- FrameworkElement.cs
- Animatable.cs
- ContentHostHelper.cs
- SettingsBase.cs
- ScriptComponentDescriptor.cs
- PartialTrustVisibleAssembliesSection.cs
- ServerValidateEventArgs.cs
- InkCanvasAutomationPeer.cs
- TextTreeNode.cs
- QueryFunctions.cs
- DataConnectionHelper.cs
- FactoryId.cs
- SqlDataSourceSelectingEventArgs.cs
- NetworkCredential.cs
- DesignerWithHeader.cs
- RuleElement.cs
- versioninfo.cs
- ChannelBase.cs
- SchemaNamespaceManager.cs
- ProgressBarRenderer.cs
- AnnotationHelper.cs
- OdbcTransaction.cs
- WebPartEventArgs.cs
- AsyncResult.cs
- XmlSerializableServices.cs
- ProtocolsConfigurationEntry.cs
- TextBoxBase.cs
- IDataContractSurrogate.cs
- Point3DConverter.cs
- SelectionProcessor.cs
- RepeaterItemCollection.cs
- QueryPageSettingsEventArgs.cs
- ColorConvertedBitmapExtension.cs
- GC.cs
- FileDialogCustomPlace.cs
- InputReport.cs
- ComponentCollection.cs
- BamlResourceContent.cs
- SingleAnimationBase.cs
- ResourceProviderFactory.cs
- CustomErrorCollection.cs
- PrivilegeNotHeldException.cs
- TextRenderingModeValidation.cs
- ReturnValue.cs
- TraceHandlerErrorFormatter.cs
- TextStore.cs
- XmlWrappingReader.cs
- AccessControlList.cs
- TypeViewSchema.cs
- TrustLevel.cs
- CssTextWriter.cs
- WebZone.cs
- DataContractAttribute.cs
- ResolveResponse.cs
- EdmProperty.cs
- AssemblyBuilder.cs
- SplineKeyFrames.cs
- AnnotationResourceChangedEventArgs.cs
- AuthenticationManager.cs
- RandomNumberGenerator.cs
- ComplusTypeValidator.cs
- Font.cs
- DBCommandBuilder.cs
- SecurityContext.cs
- MSAANativeProvider.cs
- StateDesigner.LayoutSelectionGlyph.cs