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
- HtmlImage.cs
- ComponentGuaranteesAttribute.cs
- Command.cs
- TextSelectionProcessor.cs
- unsafeIndexingFilterStream.cs
- ActivityExecutorOperation.cs
- UpWmlPageAdapter.cs
- JavascriptCallbackMessageInspector.cs
- ParameterToken.cs
- SqlCacheDependencySection.cs
- EntityTypeEmitter.cs
- ISAPIApplicationHost.cs
- WhitespaceRuleReader.cs
- PlainXmlDeserializer.cs
- ObjectDataSourceWizardForm.cs
- ColumnWidthChangedEvent.cs
- TextEncodedRawTextWriter.cs
- ReferencedCollectionType.cs
- TargetConverter.cs
- XmlRawWriterWrapper.cs
- ContextMenuStrip.cs
- ApplicationServiceHelper.cs
- SoundPlayerAction.cs
- ClientSideProviderDescription.cs
- TrustManager.cs
- Activity.cs
- BamlBinaryWriter.cs
- IisTraceListener.cs
- EntityDataSourceChangedEventArgs.cs
- CodeMethodInvokeExpression.cs
- PersistChildrenAttribute.cs
- ScriptControl.cs
- DelegateInArgument.cs
- TransformerInfo.cs
- DataServiceHostFactory.cs
- BuildManagerHost.cs
- XmlSortKeyAccumulator.cs
- TextServicesProperty.cs
- TemplateKey.cs
- WinEventTracker.cs
- MessageSecurityException.cs
- XmlExceptionHelper.cs
- WorkingDirectoryEditor.cs
- EmbossBitmapEffect.cs
- WebService.cs
- MessageQueue.cs
- JsonQNameDataContract.cs
- ExpandableObjectConverter.cs
- ToolStripRenderEventArgs.cs
- NativeMethods.cs
- ProcessingInstructionAction.cs
- MarkupExtensionParser.cs
- SafeIUnknown.cs
- CompilerResults.cs
- coordinator.cs
- HttpCookieCollection.cs
- EnumBuilder.cs
- Point4DValueSerializer.cs
- AvtEvent.cs
- SqlDataAdapter.cs
- TextTreeUndoUnit.cs
- odbcmetadatafactory.cs
- __ConsoleStream.cs
- AssemblyCollection.cs
- ImageField.cs
- DummyDataSource.cs
- OleDbMetaDataFactory.cs
- PeerCollaborationPermission.cs
- DataControlLinkButton.cs
- XmlSerializationWriter.cs
- OleDbMetaDataFactory.cs
- PropertyToken.cs
- SmtpReplyReaderFactory.cs
- CodeTypeDeclarationCollection.cs
- FtpCachePolicyElement.cs
- ApplicationInterop.cs
- Knowncolors.cs
- TransportChannelListener.cs
- ProviderConnectionPointCollection.cs
- OperatingSystem.cs
- XmlBinaryWriterSession.cs
- MailAddress.cs
- IndicCharClassifier.cs
- XmlSubtreeReader.cs
- WorkflowOperationBehavior.cs
- ModuleConfigurationInfo.cs
- ViewDesigner.cs
- PropertyInformationCollection.cs
- HttpHandlerActionCollection.cs
- DetailsViewRow.cs
- BindingContext.cs
- PointCollectionValueSerializer.cs
- WinEventWrap.cs
- DataGridRow.cs
- TypefaceMetricsCache.cs
- PrintPageEvent.cs
- SolidColorBrush.cs
- ToolStripItemClickedEventArgs.cs
- AnimationClock.cs
- EventsTab.cs