Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- GridLength.cs
- TraceFilter.cs
- ExpressionConverter.cs
- TargetParameterCountException.cs
- WindowsRebar.cs
- HttpModulesSection.cs
- RenderCapability.cs
- BamlStream.cs
- ConcurrentStack.cs
- ReferenceSchema.cs
- MediaScriptCommandRoutedEventArgs.cs
- WebControl.cs
- CategoryNameCollection.cs
- ServiceX509SecurityTokenProvider.cs
- OperatingSystem.cs
- NetTcpSection.cs
- BamlResourceDeserializer.cs
- ListViewItem.cs
- DataGridViewColumnConverter.cs
- HotSpotCollection.cs
- ParallelDesigner.xaml.cs
- NonParentingControl.cs
- Action.cs
- DragStartedEventArgs.cs
- TransformedBitmap.cs
- EncryptedData.cs
- XmlNodeChangedEventManager.cs
- XamlLoadErrorInfo.cs
- DragEvent.cs
- OracleParameterBinding.cs
- PackWebRequest.cs
- ArithmeticLiteral.cs
- BindingSource.cs
- FontFamilyValueSerializer.cs
- HttpPostedFile.cs
- HighContrastHelper.cs
- RuntimeConfigLKG.cs
- RequiredFieldValidator.cs
- BindingObserver.cs
- TextAnchor.cs
- ReachIDocumentPaginatorSerializer.cs
- FileRegion.cs
- DrawingAttributes.cs
- behaviorssection.cs
- BitmapEffectInputData.cs
- CompositeActivityMarkupSerializer.cs
- RectangleGeometry.cs
- TimeSpanMinutesConverter.cs
- WorkflowApplicationAbortedException.cs
- RoleService.cs
- PerfCounters.cs
- CompilationLock.cs
- WebResourceUtil.cs
- WindowsIdentity.cs
- RowToParametersTransformer.cs
- OneOfElement.cs
- SiteMapSection.cs
- FloaterParagraph.cs
- StringFreezingAttribute.cs
- TraceSection.cs
- CompilerResults.cs
- NamespaceMapping.cs
- UnhandledExceptionEventArgs.cs
- DependencyObjectType.cs
- AttributeParameterInfo.cs
- GrammarBuilderRuleRef.cs
- EditorZone.cs
- ComponentEvent.cs
- DataSetFieldSchema.cs
- CurrentTimeZone.cs
- XmlExpressionDumper.cs
- httpstaticobjectscollection.cs
- MarshalDirectiveException.cs
- LoadWorkflowAsyncResult.cs
- TreeView.cs
- PersistChildrenAttribute.cs
- DrawToolTipEventArgs.cs
- UnsafeCollabNativeMethods.cs
- Attribute.cs
- Int32CAMarshaler.cs
- ServiceOperation.cs
- _NegoStream.cs
- CacheSection.cs
- AssociationEndMember.cs
- ResourcePermissionBaseEntry.cs
- MostlySingletonList.cs
- SizeAnimationBase.cs
- CategoryGridEntry.cs
- BulletedListEventArgs.cs
- VirtualDirectoryMapping.cs
- EpmAttributeNameBuilder.cs
- XamlReader.cs
- PermissionToken.cs
- SystemMulticastIPAddressInformation.cs
- versioninfo.cs
- TransformCollection.cs
- BridgeDataReader.cs
- CodeNamespace.cs
- XmlTextAttribute.cs
- RegistrationProxy.cs