Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- EntityParameter.cs
- StringCollectionEditor.cs
- LabelTarget.cs
- RelatedEnd.cs
- MLangCodePageEncoding.cs
- ProfileSection.cs
- AutomationAttributeInfo.cs
- XmlAttributeCache.cs
- DefaultCompensation.cs
- RenderCapability.cs
- CompilerScope.cs
- EntityWithChangeTrackerStrategy.cs
- ProtocolImporter.cs
- SiteMapNode.cs
- CommonRemoteMemoryBlock.cs
- Translator.cs
- FileDialog_Vista.cs
- BezierSegment.cs
- AlternateView.cs
- ToolboxItemAttribute.cs
- LocatorGroup.cs
- basemetadatamappingvisitor.cs
- SynchronizingStream.cs
- FaultFormatter.cs
- ReaderOutput.cs
- LocatorPart.cs
- OleDbError.cs
- CodeThrowExceptionStatement.cs
- WorkflowView.cs
- DataTransferEventArgs.cs
- SHA256.cs
- SessionEndingCancelEventArgs.cs
- SqlGenericUtil.cs
- ModulesEntry.cs
- XmlBinaryReader.cs
- EditorPart.cs
- Wizard.cs
- SafeRightsManagementEnvironmentHandle.cs
- InvalidOleVariantTypeException.cs
- RemotingException.cs
- AlignmentXValidation.cs
- controlskin.cs
- UpdateDelegates.Generated.cs
- ReturnValue.cs
- AssociatedControlConverter.cs
- ContractComponent.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- DataGridTablesFactory.cs
- CompilationUnit.cs
- SuppressMessageAttribute.cs
- TextChangedEventArgs.cs
- TreeViewAutomationPeer.cs
- BindingCollectionElement.cs
- PassportPrincipal.cs
- Semaphore.cs
- DrawingGroupDrawingContext.cs
- MobileControlsSection.cs
- Empty.cs
- ping.cs
- RuleSettingsCollection.cs
- TrackingLocationCollection.cs
- login.cs
- PointCollectionValueSerializer.cs
- BasicHttpSecurityElement.cs
- DataGridRelationshipRow.cs
- LinearGradientBrush.cs
- HMACMD5.cs
- CalloutQueueItem.cs
- ExecutionEngineException.cs
- KoreanLunisolarCalendar.cs
- CodeAccessPermission.cs
- GeneralTransform3DGroup.cs
- MediaEntryAttribute.cs
- FloaterParaClient.cs
- BezierSegment.cs
- Border.cs
- StreamResourceInfo.cs
- ChangePassword.cs
- IsolatedStorage.cs
- XsltFunctions.cs
- IPPacketInformation.cs
- XmlSchemaComplexContent.cs
- EntityCommandDefinition.cs
- CompareInfo.cs
- HttpResponseInternalWrapper.cs
- Repeater.cs
- StreamGeometryContext.cs
- StringDictionaryWithComparer.cs
- CompiledIdentityConstraint.cs
- ThreadStateException.cs
- HtmlInputControl.cs
- SafeNativeMethods.cs
- QueryGeneratorBase.cs
- NTAccount.cs
- SingleResultAttribute.cs
- OlePropertyStructs.cs
- Point3D.cs
- BinaryCommonClasses.cs
- Parsers.cs
- ConstructorBuilder.cs