Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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 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. //------------------------------------------------------------------------------ //// 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 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
- RuleSettings.cs
- ByteAnimation.cs
- ForEachAction.cs
- Formatter.cs
- SqlServices.cs
- SessionStateContainer.cs
- BitmapScalingModeValidation.cs
- Pick.cs
- ParserStreamGeometryContext.cs
- ObjectListItem.cs
- MaskedTextBox.cs
- MemberListBinding.cs
- WindowsRichEdit.cs
- CacheRequest.cs
- OdbcConnectionStringbuilder.cs
- Point3DAnimationUsingKeyFrames.cs
- DesignerAdRotatorAdapter.cs
- Listbox.cs
- Odbc32.cs
- NamedElement.cs
- XmlMembersMapping.cs
- ToolStripSettings.cs
- XamlParser.cs
- WsatServiceAddress.cs
- StandardCommands.cs
- ConfigurationLockCollection.cs
- TransformDescriptor.cs
- DomNameTable.cs
- QuotedPrintableStream.cs
- ColorDialog.cs
- HtmlInputRadioButton.cs
- BitmapVisualManager.cs
- NumberFormatter.cs
- TextTrailingCharacterEllipsis.cs
- SimpleWorkerRequest.cs
- PropertyGridEditorPart.cs
- Query.cs
- TextEmbeddedObject.cs
- ConfigXmlComment.cs
- bidPrivateBase.cs
- FrameworkElement.cs
- Serializer.cs
- EncoderBestFitFallback.cs
- sqlnorm.cs
- TextDecorations.cs
- PersistenceTypeAttribute.cs
- AccessKeyManager.cs
- WebMessageEncodingBindingElement.cs
- ContextDataSource.cs
- DocumentPageViewAutomationPeer.cs
- ActiveXHelper.cs
- HttpClientProtocol.cs
- TcpClientSocketManager.cs
- PointCollectionConverter.cs
- BoundConstants.cs
- FloaterParagraph.cs
- DocumentSchemaValidator.cs
- PerfCounterSection.cs
- Rotation3D.cs
- StdValidatorsAndConverters.cs
- Property.cs
- sortedlist.cs
- ContainerParagraph.cs
- HttpDebugHandler.cs
- MulticastOption.cs
- Utils.cs
- EdmEntityTypeAttribute.cs
- CqlWriter.cs
- ThreadStartException.cs
- ExpressionEditorAttribute.cs
- WebConfigurationFileMap.cs
- GlobalizationSection.cs
- SessionSymmetricMessageSecurityProtocolFactory.cs
- Memoizer.cs
- ProxyWebPartConnectionCollection.cs
- ExternalCalls.cs
- DocumentAutomationPeer.cs
- HttpCookieCollection.cs
- TextSegment.cs
- PropertyInfoSet.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- GlyphElement.cs
- TdsValueSetter.cs
- XmlSchemaCompilationSettings.cs
- BridgeDataReader.cs
- MenuEventArgs.cs
- SqlTransaction.cs
- ScriptingWebServicesSectionGroup.cs
- EntityCollectionChangedParams.cs
- DockProviderWrapper.cs
- GeneralTransform3DCollection.cs
- DataControlImageButton.cs
- PersonalizationProviderHelper.cs
- XPathDocumentNavigator.cs
- ProfileManager.cs
- TailPinnedEventArgs.cs
- DataGridViewRowEventArgs.cs
- EventLogQuery.cs
- DecimalAnimation.cs
- IriParsingElement.cs