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
- InheritedPropertyChangedEventArgs.cs
- EntityCommand.cs
- AppDomainManager.cs
- QueryStringParameter.cs
- UITypeEditor.cs
- Listbox.cs
- shaperfactoryquerycachekey.cs
- DbException.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- TextRunProperties.cs
- ExecutionEngineException.cs
- ValidationPropertyAttribute.cs
- FrameworkElementAutomationPeer.cs
- Point3D.cs
- ConstraintStruct.cs
- ProxyManager.cs
- WebPartConnectionsEventArgs.cs
- ThreadAbortException.cs
- BaseDataBoundControl.cs
- mediapermission.cs
- XamlVector3DCollectionSerializer.cs
- TextViewBase.cs
- UnmanagedMemoryStream.cs
- ToolboxItemFilterAttribute.cs
- Choices.cs
- ToolStripPanel.cs
- OdbcEnvironmentHandle.cs
- UserMapPath.cs
- GCHandleCookieTable.cs
- ResourceDescriptionAttribute.cs
- InputProviderSite.cs
- XmlILStorageConverter.cs
- PlatformNotSupportedException.cs
- AdPostCacheSubstitution.cs
- Mappings.cs
- DataRowIndexBuffer.cs
- LongTypeConverter.cs
- DSASignatureFormatter.cs
- OdbcConnection.cs
- RsaKeyIdentifierClause.cs
- DesigntimeLicenseContext.cs
- PopupRootAutomationPeer.cs
- CharAnimationUsingKeyFrames.cs
- ActivationArguments.cs
- PnrpPeerResolverElement.cs
- DPCustomTypeDescriptor.cs
- HttpHandlersSection.cs
- LogEntryHeaderSerializer.cs
- WebPartTracker.cs
- AsymmetricSignatureFormatter.cs
- SqlCacheDependencySection.cs
- Predicate.cs
- ModulesEntry.cs
- _TimerThread.cs
- ExtensibleClassFactory.cs
- StructuralCache.cs
- SHA1Managed.cs
- SqlRecordBuffer.cs
- StreamingContext.cs
- MD5.cs
- DispatcherSynchronizationContext.cs
- MsmqInputSessionChannel.cs
- SymDocumentType.cs
- dtdvalidator.cs
- RegistrySecurity.cs
- WindowsAuthenticationModule.cs
- CompiledQuery.cs
- FunctionNode.cs
- ExecutionEngineException.cs
- MainMenu.cs
- ChildChangedEventArgs.cs
- SuppressMessageAttribute.cs
- BitmapImage.cs
- FormsIdentity.cs
- Number.cs
- XmlReaderDelegator.cs
- CultureInfoConverter.cs
- StringFormat.cs
- WindowsFormsLinkLabel.cs
- Stopwatch.cs
- Timer.cs
- FixedPageStructure.cs
- httpstaticobjectscollection.cs
- DetailsViewCommandEventArgs.cs
- CalendarAutomationPeer.cs
- DbConnectionOptions.cs
- TagMapInfo.cs
- UpdateExpressionVisitor.cs
- StorageEntityContainerMapping.cs
- MyContact.cs
- MLangCodePageEncoding.cs
- WpfKnownType.cs
- CompoundFileStorageReference.cs
- tibetanshape.cs
- XmlDataSourceView.cs
- GCHandleCookieTable.cs
- PropertyDescriptorCollection.cs
- CustomCredentialPolicy.cs
- TextEditor.cs
- DesignOnlyAttribute.cs