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
- Group.cs
- GridItemPatternIdentifiers.cs
- DateTimeOffset.cs
- SqlServer2KCompatibilityCheck.cs
- PathGeometry.cs
- FacetValues.cs
- MethodBody.cs
- ECDsa.cs
- ObjectReaderCompiler.cs
- ActiveXSite.cs
- RectangleHotSpot.cs
- GenericsInstances.cs
- WebSysDescriptionAttribute.cs
- CAGDesigner.cs
- StateManagedCollection.cs
- UIInitializationException.cs
- XmlNamespaceManager.cs
- Range.cs
- UnsafeNativeMethods.cs
- IPipelineRuntime.cs
- AppDomainFactory.cs
- DataRecordInfo.cs
- InvokeWebServiceDesigner.cs
- DependencyPropertyKind.cs
- RSAOAEPKeyExchangeDeformatter.cs
- XmlTextReader.cs
- BitmapEffectGroup.cs
- DataColumnChangeEvent.cs
- SynchronousChannelMergeEnumerator.cs
- xmlfixedPageInfo.cs
- StylusPointProperty.cs
- ProgressBarBrushConverter.cs
- ClientSettings.cs
- Page.cs
- LineSegment.cs
- HostProtectionPermission.cs
- GlyphRun.cs
- EffectiveValueEntry.cs
- DynamicExpression.cs
- HotCommands.cs
- DataSetViewSchema.cs
- MetabaseReader.cs
- Image.cs
- DataGridViewRowConverter.cs
- ClientSettingsSection.cs
- Matrix3DValueSerializer.cs
- SystemIPInterfaceProperties.cs
- ActiveXContainer.cs
- UDPClient.cs
- assertwrapper.cs
- CompilerHelpers.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- HttpConfigurationSystem.cs
- CalendarDay.cs
- MemberInfoSerializationHolder.cs
- ErrorHandlerModule.cs
- ListBindableAttribute.cs
- CurrentChangingEventArgs.cs
- CodeTypeDelegate.cs
- CalloutQueueItem.cs
- ObjectStateManager.cs
- XmlAnyAttributeAttribute.cs
- UriTemplateTrieNode.cs
- SmtpMail.cs
- SQLDecimalStorage.cs
- DynamicDataResources.Designer.cs
- ToolTipAutomationPeer.cs
- ReflectionServiceProvider.cs
- RC2.cs
- EntryPointNotFoundException.cs
- DataSourceCache.cs
- ValueChangedEventManager.cs
- CapabilitiesSection.cs
- ToolStripSystemRenderer.cs
- IndexingContentUnit.cs
- PropertyPushdownHelper.cs
- EntityAdapter.cs
- FixedSOMPageConstructor.cs
- ParentUndoUnit.cs
- EncodingTable.cs
- AsymmetricSignatureFormatter.cs
- XPathAncestorQuery.cs
- ListBoxItemWrapperAutomationPeer.cs
- TableAutomationPeer.cs
- XmlSchemaDocumentation.cs
- CrossContextChannel.cs
- SafeThreadHandle.cs
- Oci.cs
- DesignerObjectListAdapter.cs
- AmbientProperties.cs
- DataBinder.cs
- StringUtil.cs
- CodeEntryPointMethod.cs
- DesignerAttribute.cs
- TableNameAttribute.cs
- XmlReflectionMember.cs
- DictionaryGlobals.cs
- UIPropertyMetadata.cs
- FontDialog.cs
- DecimalAnimationBase.cs