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
- ControlCodeDomSerializer.cs
- FixedStringLookup.cs
- EventDescriptor.cs
- Oid.cs
- XsltLoader.cs
- ProcessHost.cs
- XamlTypeMapper.cs
- WindowsSlider.cs
- CacheAxisQuery.cs
- New.cs
- XmlCustomFormatter.cs
- DataTransferEventArgs.cs
- CodeCastExpression.cs
- ExeConfigurationFileMap.cs
- ImageClickEventArgs.cs
- Delay.cs
- Int64Storage.cs
- X509Chain.cs
- WinInetCache.cs
- ImageBrush.cs
- CompoundFileStorageReference.cs
- CompilerGeneratedAttribute.cs
- DropShadowEffect.cs
- TranslateTransform3D.cs
- WriterOutput.cs
- XpsImageSerializationService.cs
- UndirectedGraph.cs
- MaskedTextProvider.cs
- OracleConnectionStringBuilder.cs
- XmlAtomicValue.cs
- documentsequencetextview.cs
- PreviewPrintController.cs
- Literal.cs
- WebPartPersonalization.cs
- KeyGestureValueSerializer.cs
- Wrapper.cs
- MetaData.cs
- ASCIIEncoding.cs
- WebPartMinimizeVerb.cs
- LinqDataSourceHelper.cs
- TreeNodeEventArgs.cs
- GridEntry.cs
- Thickness.cs
- TabControl.cs
- EventLogEntry.cs
- SamlSecurityTokenAuthenticator.cs
- DesignTimeData.cs
- ErrorReporting.cs
- Memoizer.cs
- ExpressionPrefixAttribute.cs
- ArrayItemReference.cs
- cache.cs
- TargetPerspective.cs
- ExtendedPropertyCollection.cs
- ElementHost.cs
- ScrollBar.cs
- PerformanceCounterCategory.cs
- Pair.cs
- Animatable.cs
- SegmentInfo.cs
- ContentHostHelper.cs
- UTF7Encoding.cs
- WebPartPersonalization.cs
- ListenerElementsCollection.cs
- _AuthenticationState.cs
- StickyNote.cs
- Image.cs
- HtmlTextViewAdapter.cs
- XPathSelfQuery.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DataGridTextBoxColumn.cs
- EUCJPEncoding.cs
- CodePageUtils.cs
- WmfPlaceableFileHeader.cs
- GeneralTransform3D.cs
- ViewBase.cs
- FormsAuthenticationCredentials.cs
- RequestUriProcessor.cs
- PageVisual.cs
- GenerateHelper.cs
- SmtpFailedRecipientsException.cs
- DeviceSpecificDesigner.cs
- SystemResources.cs
- ToolStripTextBox.cs
- GetWinFXPath.cs
- SplineKeyFrames.cs
- FixedSOMGroup.cs
- Int32RectConverter.cs
- Expression.cs
- BlockCollection.cs
- DeviceContexts.cs
- SelectionHighlightInfo.cs
- RijndaelCryptoServiceProvider.cs
- CodeDomConfigurationHandler.cs
- ExtensionSurface.cs
- ToggleProviderWrapper.cs
- SafeNativeMethods.cs
- ToolStripLocationCancelEventArgs.cs
- OleDbReferenceCollection.cs
- ObjectNavigationPropertyMapping.cs