Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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.
//
//-----------------------------------------------------------------------------
/*
*/
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
- TextDpi.cs
- AspCompat.cs
- Storyboard.cs
- XPathMessageFilter.cs
- IndexedGlyphRun.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DragEventArgs.cs
- NavigationPropertyEmitter.cs
- DocumentPageViewAutomationPeer.cs
- XsdValidatingReader.cs
- ControlBuilder.cs
- FixedPageAutomationPeer.cs
- StreamGeometry.cs
- DataGridPagerStyle.cs
- WizardDesigner.cs
- MatrixCamera.cs
- StylusDevice.cs
- InternalConfigEventArgs.cs
- HttpsTransportBindingElement.cs
- SHA512CryptoServiceProvider.cs
- ISAPIApplicationHost.cs
- FactoryGenerator.cs
- CodeExporter.cs
- CustomErrorsSectionWrapper.cs
- InvalidComObjectException.cs
- SignatureDescription.cs
- QueryStoreStatusRequest.cs
- WpfWebRequestHelper.cs
- TargetException.cs
- Ray3DHitTestResult.cs
- EventTrigger.cs
- StateRuntime.cs
- ToolStripRenderEventArgs.cs
- SiteMap.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- AddInSegmentDirectoryNotFoundException.cs
- EpmHelper.cs
- Padding.cs
- QuotedPrintableStream.cs
- GridViewColumnCollectionChangedEventArgs.cs
- SystemDropShadowChrome.cs
- XamlTreeBuilder.cs
- StateManagedCollection.cs
- ConnectionsZone.cs
- TimeoutException.cs
- BitmapCache.cs
- IsolatedStorage.cs
- DiscoveryRequestHandler.cs
- DataGridViewCellStyleChangedEventArgs.cs
- StateItem.cs
- AssociationTypeEmitter.cs
- ThicknessAnimation.cs
- DelimitedListTraceListener.cs
- CompensateDesigner.cs
- Viewport3DAutomationPeer.cs
- DesignerVerbCollection.cs
- Keywords.cs
- LinearKeyFrames.cs
- TransformPatternIdentifiers.cs
- AsyncStreamReader.cs
- ConditionalAttribute.cs
- InternalControlCollection.cs
- SqlTriggerAttribute.cs
- IProvider.cs
- ObjectDataSourceDisposingEventArgs.cs
- EntityDataSourceContainerNameConverter.cs
- _CommandStream.cs
- CultureSpecificCharacterBufferRange.cs
- SQLDateTimeStorage.cs
- ServiceNameElement.cs
- SeverityFilter.cs
- RsaSecurityKey.cs
- ExtendedProperty.cs
- BasicCellRelation.cs
- CodeCastExpression.cs
- ContentType.cs
- PersonalizationProvider.cs
- ReaderWriterLock.cs
- elementinformation.cs
- RuntimeCompatibilityAttribute.cs
- DocumentViewerBase.cs
- DecimalStorage.cs
- LateBoundBitmapDecoder.cs
- MetafileHeaderWmf.cs
- InvalidDataException.cs
- WebPartMovingEventArgs.cs
- NativeMethodsOther.cs
- Dictionary.cs
- Validator.cs
- PersonalizationState.cs
- AnonymousIdentificationModule.cs
- Logging.cs
- FormatterServices.cs
- List.cs
- AttachedPropertyBrowsableAttribute.cs
- Trace.cs
- AsmxEndpointPickerExtension.cs
- OperationCanceledException.cs
- DataPagerFieldItem.cs
- HttpListenerResponse.cs