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
- ColorConvertedBitmap.cs
- RoutedUICommand.cs
- ClientConfigurationHost.cs
- ValueQuery.cs
- FixedBufferAttribute.cs
- ThemeInfoAttribute.cs
- MenuEventArgs.cs
- Util.cs
- Vector3DConverter.cs
- HealthMonitoringSectionHelper.cs
- UnSafeCharBuffer.cs
- CultureSpecificStringDictionary.cs
- TraceData.cs
- SmtpNegotiateAuthenticationModule.cs
- RegistryKey.cs
- ContractTypeNameCollection.cs
- XsdDateTime.cs
- PropertyMap.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- ValidationResult.cs
- ConfigurationStrings.cs
- RoutedEventHandlerInfo.cs
- Help.cs
- SqlConnectionStringBuilder.cs
- ProcessHostConfigUtils.cs
- QuotaThrottle.cs
- BamlResourceContent.cs
- RangeValidator.cs
- WebEvents.cs
- IgnorePropertiesAttribute.cs
- OptimisticConcurrencyException.cs
- WaitHandle.cs
- CompiledRegexRunner.cs
- DefaultAutoFieldGenerator.cs
- SelectionProcessor.cs
- ProfileBuildProvider.cs
- RuleSetCollection.cs
- Tablet.cs
- TemplatedAdorner.cs
- CodeNamespaceImport.cs
- SignatureGenerator.cs
- FastPropertyAccessor.cs
- SqlXml.cs
- MeasurementDCInfo.cs
- TypeBuilderInstantiation.cs
- ContentPosition.cs
- MetadataArtifactLoaderCompositeResource.cs
- MarkupCompiler.cs
- ConfigXmlWhitespace.cs
- MimeWriter.cs
- iisPickupDirectory.cs
- BindableTemplateBuilder.cs
- UnsafeNativeMethodsPenimc.cs
- ImmutableAssemblyCacheEntry.cs
- Sql8ConformanceChecker.cs
- CacheMode.cs
- GestureRecognitionResult.cs
- InputManager.cs
- Expr.cs
- IconHelper.cs
- ColorTypeConverter.cs
- EncryptedPackage.cs
- DesignBindingPicker.cs
- PeerTransportSecuritySettings.cs
- GeneralTransformGroup.cs
- PropertyItemInternal.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- MouseGestureConverter.cs
- ActivityDesignerLayoutSerializers.cs
- followingquery.cs
- IfAction.cs
- TdsEnums.cs
- PersonalizablePropertyEntry.cs
- UnsafeNativeMethods.cs
- DocumentXPathNavigator.cs
- MDIClient.cs
- ContainerFilterService.cs
- HostedTransportConfigurationManager.cs
- TabletDevice.cs
- ResourcePart.cs
- QueryCreatedEventArgs.cs
- DrawingBrush.cs
- XmlTypeMapping.cs
- OdbcDataReader.cs
- TabletCollection.cs
- IIS7UserPrincipal.cs
- ManipulationDeltaEventArgs.cs
- NetNamedPipeBindingCollectionElement.cs
- XmlNamespaceManager.cs
- TextLineResult.cs
- XmlNamespaceManager.cs
- RemotingAttributes.cs
- Lease.cs
- Translator.cs
- AppDomainManager.cs
- LineGeometry.cs
- VirtualizingStackPanel.cs
- ObjectToken.cs
- Error.cs
- HostingEnvironmentException.cs