Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Collections / Generic / DebugView.cs / 1 / DebugView.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================================== ** ** ** ** Purpose: DebugView class for generic collections ** ** =============================================================================*/ namespace System.Collections.Generic { using System; using System.Collections.ObjectModel; using System.Security.Permissions; using System.Diagnostics; // // VS IDE can't differentiate between types with the same name from different // assembly. So we need to use different names for collection debug view for // collections in mscorlib.dll and system.dll. // internal sealed class Mscorlib_CollectionDebugView{ private ICollection collection; public Mscorlib_CollectionDebugView(ICollection collection) { if (collection == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); this.collection = collection; } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public T[] Items { get { T[] items = new T[collection.Count]; collection.CopyTo(items, 0); return items; } } } internal sealed class Mscorlib_DictionaryKeyCollectionDebugView { private ICollection collection; public Mscorlib_DictionaryKeyCollectionDebugView(ICollection collection) { if (collection == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); this.collection = collection; } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public TKey[] Items { get { TKey[] items = new TKey[collection.Count]; collection.CopyTo(items, 0); return items; } } } internal sealed class Mscorlib_DictionaryValueCollectionDebugView { private ICollection collection; public Mscorlib_DictionaryValueCollectionDebugView(ICollection collection) { if (collection == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.collection); this.collection = collection; } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public TValue[] Items { get { TValue[] items = new TValue[collection.Count]; collection.CopyTo(items, 0); return items; } } } internal sealed class Mscorlib_DictionaryDebugView { private IDictionary dict; public Mscorlib_DictionaryDebugView(IDictionary dictionary) { if (dictionary == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.dictionary); this.dict = dictionary; } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public KeyValuePair [] Items { get { KeyValuePair [] items = new KeyValuePair [dict.Count]; dict.CopyTo(items, 0); return items; } } } internal sealed class Mscorlib_KeyedCollectionDebugView { private KeyedCollection kc; public Mscorlib_KeyedCollectionDebugView(KeyedCollection keyedCollection) { if (keyedCollection == null) { throw new ArgumentNullException("keyedCollection"); } kc = keyedCollection; } [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] public T[] Items { get { T[] items = new T[kc.Count]; kc.CopyTo(items, 0); return items; } } } } // 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
- FunctionQuery.cs
- SubMenuStyle.cs
- SoapSchemaImporter.cs
- InvalidCastException.cs
- MouseBinding.cs
- ProjectionPath.cs
- StylusPointDescription.cs
- TokenizerHelper.cs
- Parsers.cs
- UnmanagedMarshal.cs
- TraceSource.cs
- ElementProxy.cs
- RIPEMD160.cs
- XmlSchemaNotation.cs
- IPipelineRuntime.cs
- ListBoxItem.cs
- ReversePositionQuery.cs
- DockPattern.cs
- CoreChannel.cs
- Literal.cs
- DefaultPropertyAttribute.cs
- StreamResourceInfo.cs
- XsltSettings.cs
- ToolboxControl.cs
- DataGridViewRowsRemovedEventArgs.cs
- Visitor.cs
- TileBrush.cs
- Calendar.cs
- MsmqTransportElement.cs
- StaticResourceExtension.cs
- FixedTextContainer.cs
- ProfileModule.cs
- DataGridViewLayoutData.cs
- WindowsSlider.cs
- SamlNameIdentifierClaimResource.cs
- BinaryUtilClasses.cs
- PrintController.cs
- ClientFormsAuthenticationCredentials.cs
- Normalization.cs
- PaperSource.cs
- XmlSchemaValidator.cs
- WebBrowser.cs
- BinaryFormatter.cs
- EpmContentSerializerBase.cs
- AccessedThroughPropertyAttribute.cs
- BackgroundWorker.cs
- WizardPanel.cs
- SoapCodeExporter.cs
- CompilationRelaxations.cs
- HtmlImage.cs
- Model3D.cs
- EmissiveMaterial.cs
- CompilationSection.cs
- FillBehavior.cs
- SmiEventStream.cs
- DirectoryInfo.cs
- Context.cs
- Vars.cs
- webproxy.cs
- AstNode.cs
- DPTypeDescriptorContext.cs
- ButtonRenderer.cs
- SpecularMaterial.cs
- QilList.cs
- ISAPIRuntime.cs
- ListenerTraceUtility.cs
- FileDialog.cs
- SequenceNumber.cs
- Model3DGroup.cs
- MaskInputRejectedEventArgs.cs
- CallContext.cs
- Timer.cs
- RelationshipEndCollection.cs
- MessageSmuggler.cs
- AuthorizationBehavior.cs
- HttpCacheParams.cs
- EllipseGeometry.cs
- DataViewSetting.cs
- PasswordBox.cs
- DataGridViewCellValidatingEventArgs.cs
- BaseTemplateParser.cs
- CqlLexerHelpers.cs
- SqlDependencyListener.cs
- CompilerError.cs
- CFGGrammar.cs
- ManagementObject.cs
- UiaCoreApi.cs
- RecognizedWordUnit.cs
- PenThreadPool.cs
- ControlAdapter.cs
- WebHttpBindingElement.cs
- KeyEvent.cs
- LaxModeSecurityHeaderElementInferenceEngine.cs
- InvalidDocumentContentsException.cs
- parserscommon.cs
- ClientSettingsSection.cs
- ListViewUpdateEventArgs.cs
- ObjectSelectorEditor.cs
- StylusPointPropertyUnit.cs
- HttpProfileGroupBase.cs