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
- MessageSecurityOverHttp.cs
- TextMessageEncodingElement.cs
- RichTextBoxContextMenu.cs
- PrintDialog.cs
- SecurityToken.cs
- ObjectPropertyMapping.cs
- PromptEventArgs.cs
- ExtentCqlBlock.cs
- XmlAggregates.cs
- StaticFileHandler.cs
- Triangle.cs
- WebPartEventArgs.cs
- ObjectDesignerDataSourceView.cs
- PropertyChangedEventArgs.cs
- GenericTypeParameterBuilder.cs
- PropertyPushdownHelper.cs
- TextEmbeddedObject.cs
- OracleSqlParser.cs
- Sql8ExpressionRewriter.cs
- ConnectionManagementElement.cs
- XmlCDATASection.cs
- CaretElement.cs
- TextDecorations.cs
- ScriptReferenceBase.cs
- SimpleApplicationHost.cs
- UnmanagedMarshal.cs
- TransactionManager.cs
- RuntimeArgumentHandle.cs
- TokenBasedSetEnumerator.cs
- XmlSignatureManifest.cs
- OrderedDictionary.cs
- OrderablePartitioner.cs
- PeerEndPoint.cs
- ComponentResourceManager.cs
- ConnectionPoolRegistry.cs
- ToolStripItem.cs
- AssociationSet.cs
- XhtmlCssHandler.cs
- TraceListeners.cs
- Pair.cs
- DocumentGridContextMenu.cs
- AssemblyCollection.cs
- DebugView.cs
- EntityClassGenerator.cs
- TCPClient.cs
- FontFamilyValueSerializer.cs
- ListViewSelectEventArgs.cs
- XmlTypeMapping.cs
- WhitespaceRule.cs
- _LocalDataStoreMgr.cs
- CheckBoxStandardAdapter.cs
- PolicyImporterElementCollection.cs
- SQLChars.cs
- ComponentResourceManager.cs
- XmlLinkedNode.cs
- InertiaRotationBehavior.cs
- DesignerLabelAdapter.cs
- OdbcParameterCollection.cs
- SessionPageStateSection.cs
- TemplatedMailWebEventProvider.cs
- ToolStripScrollButton.cs
- SafeCryptoHandles.cs
- RadioButton.cs
- BorderGapMaskConverter.cs
- TopClause.cs
- DataTemplateKey.cs
- HitTestParameters3D.cs
- RightsManagementInformation.cs
- RuntimeEnvironment.cs
- NativeMethodsOther.cs
- SystemPens.cs
- RangeBase.cs
- CompositeCollectionView.cs
- StorageEntitySetMapping.cs
- TypeToken.cs
- DetailsViewPagerRow.cs
- HttpAsyncResult.cs
- ViewLoader.cs
- InstanceOwnerException.cs
- ScalarConstant.cs
- InfoCardTrace.cs
- HttpProtocolImporter.cs
- StackSpiller.cs
- DecimalAnimationBase.cs
- PriorityChain.cs
- WebPartConnectVerb.cs
- PatternMatcher.cs
- ColorAnimation.cs
- MetadataArtifactLoaderComposite.cs
- MediaSystem.cs
- WebHttpEndpointElement.cs
- EntityDataSourceStatementEditorForm.cs
- JpegBitmapDecoder.cs
- SessionEndingEventArgs.cs
- NativeMethods.cs
- FrameworkContentElementAutomationPeer.cs
- TextElementEditingBehaviorAttribute.cs
- PeerUnsafeNativeCryptMethods.cs
- Serializer.cs
- XmlExpressionDumper.cs