Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebParts / WebPartZoneCollection.cs / 1305376 / WebPartZoneCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Globalization; ////// Read-only collection of WebPartZones. Collection cannot be modified after contstruction. /// public sealed class WebPartZoneCollection : ReadOnlyCollectionBase { public WebPartZoneCollection() { } public WebPartZoneCollection(ICollection webPartZones) { if (webPartZones == null) { throw new ArgumentNullException("webPartZones"); } foreach (object obj in webPartZones) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "webPartZones"); } if (!(obj is WebPartZone)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "WebPartZone"), "webPartZones"); } InnerList.Add(obj); } } internal int Add(WebPartZoneBase value) { return InnerList.Add(value); } public bool Contains(WebPartZoneBase value) { return InnerList.Contains(value); } public int IndexOf(WebPartZoneBase value) { return InnerList.IndexOf(value); } public WebPartZoneBase this[int index] { get { return (WebPartZoneBase) InnerList[index]; } } public WebPartZoneBase this[string id] { get { WebPartZoneBase selectedZone = null; foreach (WebPartZoneBase zone in InnerList) { if (String.Equals(zone.ID, id, StringComparison.OrdinalIgnoreCase)) { selectedZone = zone; break; } } return selectedZone; } } ////// public void CopyTo(WebPartZoneBase[] array, int index) { InnerList.CopyTo(array, index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Copies contents from the collection to a specified array with a /// specified starting index. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.WebControls.WebParts { using System; using System.Collections; using System.Globalization; ////// Read-only collection of WebPartZones. Collection cannot be modified after contstruction. /// public sealed class WebPartZoneCollection : ReadOnlyCollectionBase { public WebPartZoneCollection() { } public WebPartZoneCollection(ICollection webPartZones) { if (webPartZones == null) { throw new ArgumentNullException("webPartZones"); } foreach (object obj in webPartZones) { if (obj == null) { throw new ArgumentException(SR.GetString(SR.Collection_CantAddNull), "webPartZones"); } if (!(obj is WebPartZone)) { throw new ArgumentException(SR.GetString(SR.Collection_InvalidType, "WebPartZone"), "webPartZones"); } InnerList.Add(obj); } } internal int Add(WebPartZoneBase value) { return InnerList.Add(value); } public bool Contains(WebPartZoneBase value) { return InnerList.Contains(value); } public int IndexOf(WebPartZoneBase value) { return InnerList.IndexOf(value); } public WebPartZoneBase this[int index] { get { return (WebPartZoneBase) InnerList[index]; } } public WebPartZoneBase this[string id] { get { WebPartZoneBase selectedZone = null; foreach (WebPartZoneBase zone in InnerList) { if (String.Equals(zone.ID, id, StringComparison.OrdinalIgnoreCase)) { selectedZone = zone; break; } } return selectedZone; } } ////// public void CopyTo(WebPartZoneBase[] array, int index) { InnerList.CopyTo(array, index); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Copies contents from the collection to a specified array with a /// specified starting index. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MappingSource.cs
- SafeNativeMethods.cs
- XamlToRtfParser.cs
- RequestCacheManager.cs
- TextBoxView.cs
- DataGridCellsPanel.cs
- LongValidator.cs
- HttpFileCollection.cs
- DecimalAnimation.cs
- FontEmbeddingManager.cs
- InvokerUtil.cs
- MouseGestureValueSerializer.cs
- mansign.cs
- InfoCardXmlSerializer.cs
- DrawingContextDrawingContextWalker.cs
- Column.cs
- XPathDocumentBuilder.cs
- ConnectionStringSettingsCollection.cs
- PaintValueEventArgs.cs
- HttpProfileGroupBase.cs
- WindowsFormsSynchronizationContext.cs
- DataGridColumnHeadersPresenterAutomationPeer.cs
- ContentPlaceHolderDesigner.cs
- FixedPageProcessor.cs
- TdsValueSetter.cs
- Model3D.cs
- ThreadExceptionEvent.cs
- TrackPointCollection.cs
- ToolStripMenuItemDesigner.cs
- HtmlElementErrorEventArgs.cs
- DispatchChannelSink.cs
- NullReferenceException.cs
- ImmutableCommunicationTimeouts.cs
- Clock.cs
- _Events.cs
- MultiSelectRootGridEntry.cs
- DomainUpDown.cs
- BitArray.cs
- TextUtf8RawTextWriter.cs
- FixedSOMTableRow.cs
- XmlILCommand.cs
- TextOnlyOutput.cs
- Tracking.cs
- DateTimeEditor.cs
- COM2FontConverter.cs
- sqlpipe.cs
- EnterpriseServicesHelper.cs
- ClrPerspective.cs
- CodeNamespaceCollection.cs
- DesignerLoader.cs
- UIPermission.cs
- TakeQueryOptionExpression.cs
- SqlDataReaderSmi.cs
- StylusOverProperty.cs
- TailCallAnalyzer.cs
- VirtualDirectoryMappingCollection.cs
- BaseTemplateBuildProvider.cs
- BinaryVersion.cs
- TableLayoutPanel.cs
- Transform3D.cs
- EncryptedPackageFilter.cs
- UidManager.cs
- TextServicesLoader.cs
- XmlSchemaObjectCollection.cs
- BamlTreeUpdater.cs
- SqlBulkCopy.cs
- UpdateExpressionVisitor.cs
- XmlSchemaElement.cs
- ResourceKey.cs
- GregorianCalendarHelper.cs
- InvokeHandlers.cs
- MultiAsyncResult.cs
- METAHEADER.cs
- LinqToSqlWrapper.cs
- DrawingContextFlattener.cs
- AppModelKnownContentFactory.cs
- ConfigurationValidatorAttribute.cs
- SafeTokenHandle.cs
- LinearGradientBrush.cs
- WCFBuildProvider.cs
- TrackingServices.cs
- ThicknessAnimationBase.cs
- InteropAutomationProvider.cs
- HitTestResult.cs
- AdapterUtil.cs
- _TimerThread.cs
- Script.cs
- GlyphRunDrawing.cs
- _ShellExpression.cs
- Point3DCollection.cs
- PictureBoxDesigner.cs
- SqlDataReader.cs
- WebRequestModuleElementCollection.cs
- CodeMemberProperty.cs
- SocketCache.cs
- NoneExcludedImageIndexConverter.cs
- SerializationFieldInfo.cs
- NavigationWindow.cs
- Window.cs
- AssociationType.cs