Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / GridEntryCollection.cs / 1 / GridEntryCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.Windows.Forms.PropertyGridInternal { using System.Runtime.InteropServices; using System.Diagnostics; using System; using System.Collections; using System.Reflection; using System.Drawing.Design; using System.ComponentModel; using System.ComponentModel.Design; using System.Windows.Forms; using System.Windows.Forms.Design; using System.Drawing; using Microsoft.Win32; internal class GridEntryCollection : GridItemCollection { private GridEntry owner; public GridEntryCollection(GridEntry owner, GridEntry[] entries) : base(entries) { this.owner = owner; } public void AddRange(GridEntry[] value) { if (value == null) { throw new ArgumentNullException("value"); } if (entries != null) { GridEntry[] newArray = new GridEntry[entries.Length + value.Length]; entries.CopyTo(newArray, 0); value.CopyTo(newArray, entries.Length); entries = newArray; } else { entries = (GridEntry[])value.Clone(); } } public void Clear() { entries = new GridEntry[0]; } public void CopyTo(Array dest, int index) { entries.CopyTo(dest, index); } internal GridEntry GetEntry(int index) { return (GridEntry)entries[index]; } internal int GetEntry(GridEntry child) { return Array.IndexOf(entries, child); } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (disposing) { if (owner != null && entries != null) { for (int i = 0; i < entries.Length; i++) { if (entries[i] != null) { ((GridEntry)entries[i]).Dispose(); entries[i] = null; } } entries = new GridEntry[0]; } } } ~GridEntryCollection() { Dispose(false); } } } // 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
- InProcStateClientManager.cs
- itemelement.cs
- CollectionChangeEventArgs.cs
- UnsafeNativeMethods.cs
- WebPartHeaderCloseVerb.cs
- figurelengthconverter.cs
- ServiceNameCollection.cs
- ZipIOBlockManager.cs
- LineSegment.cs
- SystemColors.cs
- CacheOutputQuery.cs
- ReadWriteControlDesigner.cs
- ValueSerializerAttribute.cs
- GridView.cs
- OleDbPermission.cs
- OperandQuery.cs
- MouseEventArgs.cs
- RtType.cs
- PageStatePersister.cs
- DocumentViewer.cs
- hwndwrapper.cs
- ExpressionSelection.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- VisualStateGroup.cs
- TextTreeExtractElementUndoUnit.cs
- XPathAxisIterator.cs
- GenericUI.cs
- TcpHostedTransportConfiguration.cs
- BuildManager.cs
- CacheForPrimitiveTypes.cs
- PageParserFilter.cs
- IfAction.cs
- ExtensionsSection.cs
- GacUtil.cs
- ExpressionConverter.cs
- CacheChildrenQuery.cs
- ViewStateModeByIdAttribute.cs
- XXXOnTypeBuilderInstantiation.cs
- XmlAttributeCollection.cs
- BindingRestrictions.cs
- ImageAttributes.cs
- PerspectiveCamera.cs
- SessionStateItemCollection.cs
- PlaceHolder.cs
- DateTimeOffsetStorage.cs
- IODescriptionAttribute.cs
- ResourceSet.cs
- CompareInfo.cs
- AccessedThroughPropertyAttribute.cs
- ProviderConnectionPoint.cs
- StringValidator.cs
- SoapTransportImporter.cs
- CmsInterop.cs
- ISO2022Encoding.cs
- PathStreamGeometryContext.cs
- SmiRequestExecutor.cs
- Brush.cs
- WebPartCancelEventArgs.cs
- RelationshipSet.cs
- DesignerAdapterUtil.cs
- ScriptingScriptResourceHandlerSection.cs
- DataQuery.cs
- BindingsSection.cs
- CodeGroup.cs
- LayoutTable.cs
- ProtectedProviderSettings.cs
- String.cs
- DbModificationClause.cs
- XmlResolver.cs
- InputBuffer.cs
- EncryptedXml.cs
- HitTestParameters3D.cs
- CategoryGridEntry.cs
- TextEffect.cs
- X509Certificate.cs
- ConfigXmlDocument.cs
- DataGridViewCellStyleBuilderDialog.cs
- SourceElementsCollection.cs
- FrameSecurityDescriptor.cs
- XmlTextAttribute.cs
- documentsequencetextcontainer.cs
- BitmapEffect.cs
- SafeFileMapViewHandle.cs
- VersionedStreamOwner.cs
- DataGridViewColumnStateChangedEventArgs.cs
- DesignTimeParseData.cs
- GlyphRunDrawing.cs
- SessionIDManager.cs
- ContextMenuStripActionList.cs
- HandlerBase.cs
- TypeHelpers.cs
- FormViewInsertEventArgs.cs
- TypedColumnHandler.cs
- TemplatedMailWebEventProvider.cs
- DbCommandTree.cs
- GeneralTransformCollection.cs
- EncryptedPackage.cs
- ManualResetEvent.cs
- recordstate.cs
- SerializerProvider.cs