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
- DataView.cs
- XmlValueConverter.cs
- XPathChildIterator.cs
- ApplyTemplatesAction.cs
- ContentType.cs
- EventLogPermissionHolder.cs
- WindowsEditBox.cs
- OuterGlowBitmapEffect.cs
- IApplicationTrustManager.cs
- PageRequestManager.cs
- MarkupExtensionParser.cs
- SoapIncludeAttribute.cs
- PeerInvitationResponse.cs
- LinearQuaternionKeyFrame.cs
- XmlComplianceUtil.cs
- XmlDataProvider.cs
- FacetValueContainer.cs
- XMLDiffLoader.cs
- ParameterToken.cs
- WebProxyScriptElement.cs
- ActivityStatusChangeEventArgs.cs
- FontFamily.cs
- ContentWrapperAttribute.cs
- SafeReversePInvokeHandle.cs
- ProgressBar.cs
- GridViewSelectEventArgs.cs
- HttpNamespaceReservationInstallComponent.cs
- SerialPort.cs
- GridViewRowEventArgs.cs
- QilScopedVisitor.cs
- SessionStateItemCollection.cs
- ArrangedElement.cs
- QilBinary.cs
- SystemDiagnosticsSection.cs
- InputLanguageCollection.cs
- ContextBase.cs
- SectionXmlInfo.cs
- HttpContextServiceHost.cs
- TableItemStyle.cs
- ThousandthOfEmRealPoints.cs
- CodeObject.cs
- GiveFeedbackEvent.cs
- Polygon.cs
- ExternalDataExchangeClient.cs
- ExpressionLink.cs
- HGlobalSafeHandle.cs
- ObjectAnimationUsingKeyFrames.cs
- DataGridTable.cs
- TreeNodeConverter.cs
- _CookieModule.cs
- DesignerEditorPartChrome.cs
- InertiaExpansionBehavior.cs
- AutomationPatternInfo.cs
- SqlDataSourceQueryEditor.cs
- ColorPalette.cs
- SymDocumentType.cs
- PackageProperties.cs
- ColorConverter.cs
- XmlDictionaryReader.cs
- ErrorLog.cs
- ADRole.cs
- SqlDataSourceView.cs
- SerializationSectionGroup.cs
- Sql8ConformanceChecker.cs
- GridViewColumnHeaderAutomationPeer.cs
- PageMediaType.cs
- ControlPaint.cs
- OptionUsage.cs
- MSAANativeProvider.cs
- BindingList.cs
- ColumnWidthChangingEvent.cs
- KeySplineConverter.cs
- SchemaElementLookUpTableEnumerator.cs
- RtfControlWordInfo.cs
- KeyValueSerializer.cs
- HttpContextBase.cs
- ServiceCredentialsElement.cs
- Set.cs
- TransactionContextManager.cs
- HwndHost.cs
- XamlClipboardData.cs
- XmlCharCheckingWriter.cs
- JsonReader.cs
- ObjectStateEntryBaseUpdatableDataRecord.cs
- PagerSettings.cs
- QilFunction.cs
- KeyTimeConverter.cs
- MouseDevice.cs
- RemoteTokenFactory.cs
- EntityDataSourceDataSelection.cs
- BasicExpressionVisitor.cs
- CompensatableTransactionScopeActivity.cs
- SchemaManager.cs
- DataGridViewCellStyle.cs
- PropertyToken.cs
- AutomationPropertyChangedEventArgs.cs
- ValueCollectionParameterReader.cs
- AnonymousIdentificationModule.cs
- DataGridItemCollection.cs
- IntermediatePolicyValidator.cs