Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / WinForms / Managed / System / WinForms / PropertyGridInternal / GridEntryCollection.cs / 1305376 / 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. // //----------------------------------------------------------------------------- /* */ 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CellNormalizer.cs
- SeparatorAutomationPeer.cs
- DatePicker.cs
- SemanticResolver.cs
- EpmCustomContentSerializer.cs
- QueryConverter.cs
- CopyOfAction.cs
- RemotingAttributes.cs
- MessageSmuggler.cs
- XmlUTF8TextReader.cs
- TabletDeviceInfo.cs
- ResXResourceReader.cs
- httpserverutility.cs
- EncryptedData.cs
- PageBuildProvider.cs
- TypeUtils.cs
- EntryPointNotFoundException.cs
- OdbcReferenceCollection.cs
- GuidConverter.cs
- HttpModuleCollection.cs
- TextRangeBase.cs
- CompositeTypefaceMetrics.cs
- HtmlInputControl.cs
- RIPEMD160Managed.cs
- odbcmetadatacollectionnames.cs
- RectangleConverter.cs
- DynamicPropertyReader.cs
- VerbConverter.cs
- UpdateManifestForBrowserApplication.cs
- ReadWriteSpinLock.cs
- ContentType.cs
- ActivationServices.cs
- Int32KeyFrameCollection.cs
- SendMessageRecord.cs
- OleDbEnumerator.cs
- ApplicationDirectoryMembershipCondition.cs
- PersistenceMetadataNamespace.cs
- Property.cs
- TrackBarDesigner.cs
- XmlCountingReader.cs
- CngKey.cs
- RequestResizeEvent.cs
- DataKey.cs
- IntranetCredentialPolicy.cs
- TcpChannelFactory.cs
- ObjectDataSourceDisposingEventArgs.cs
- GridViewPageEventArgs.cs
- LinkedResourceCollection.cs
- Brush.cs
- EndpointAddress.cs
- LoginNameDesigner.cs
- Visual3D.cs
- IItemContainerGenerator.cs
- TextChange.cs
- GeometryValueSerializer.cs
- EventMap.cs
- DecoderBestFitFallback.cs
- GridEntry.cs
- TraceShell.cs
- OleDbConnectionPoolGroupProviderInfo.cs
- ObjectDataSourceSelectingEventArgs.cs
- SHA384.cs
- SessionStateUtil.cs
- BinaryMethodMessage.cs
- RuleProcessor.cs
- VectorCollectionValueSerializer.cs
- CallContext.cs
- StylusButtonEventArgs.cs
- MdImport.cs
- PathSegmentCollection.cs
- SelectionList.cs
- TimeIntervalCollection.cs
- Popup.cs
- ADMembershipUser.cs
- DataSourceSerializationException.cs
- GenericTypeParameterBuilder.cs
- SizeAnimation.cs
- WebSysDisplayNameAttribute.cs
- FrameworkContentElement.cs
- RadioButtonList.cs
- TraceListener.cs
- FixedSOMTable.cs
- XmlQueryType.cs
- ConnectionProviderAttribute.cs
- OdbcConnectionHandle.cs
- SizeIndependentAnimationStorage.cs
- InheritanceContextHelper.cs
- FormsIdentity.cs
- XamlVector3DCollectionSerializer.cs
- MultiSelectRootGridEntry.cs
- TakeQueryOptionExpression.cs
- WebPartZoneBaseDesigner.cs
- LinkConverter.cs
- CounterSet.cs
- SyndicationDeserializer.cs
- HtmlFormWrapper.cs
- DBCSCodePageEncoding.cs
- SettingsContext.cs
- ExpressionWriter.cs
- SettingsSection.cs