Fix bugs in sizing TableLayoutPanel (Xamarin bug 18638)
[mono.git] / mcs / class / System.ComponentModel.Composition / src / ComponentModel / System / ComponentModel / Composition / Hosting / AssemblyCatalogDebuggerProxy.cs
1 // -----------------------------------------------------------------------\r
2 // Copyright (c) Microsoft Corporation.  All rights reserved.\r
3 // -----------------------------------------------------------------------\r
4 using System;\r
5 using System.Collections.ObjectModel;\r
6 using System.ComponentModel.Composition.Primitives;\r
7 using System.ComponentModel.Composition.ReflectionModel;\r
8 using System.Linq;\r
9 using System.Reflection;\r
10 using Microsoft.Internal;\r
11 using Microsoft.Internal.Collections;\r
12 \r
13 namespace System.ComponentModel.Composition.Hosting\r
14 {\r
15     internal class AssemblyCatalogDebuggerProxy\r
16     {\r
17         private readonly AssemblyCatalog _catalog;\r
18 \r
19         public AssemblyCatalogDebuggerProxy(AssemblyCatalog catalog)\r
20         {\r
21             Requires.NotNull(catalog, "catalog");\r
22 \r
23             this._catalog = catalog;\r
24         }\r
25 \r
26         public Assembly Assembly\r
27         {\r
28             get { return this._catalog.Assembly; }\r
29         }\r
30 \r
31         public ReadOnlyCollection<ComposablePartDefinition> Parts\r
32         {\r
33             // NOTE: This shouldn't be cached, so that on every query of\r
34             // the current value of the underlying catalog is respected.\r
35             // We use ReadOnlyCollection as arrays do not have the \r
36             // appropriate debugger display attributes applied to them.\r
37             get { return this._catalog.Parts.ToReadOnlyCollection(); }\r
38         }\r
39     }\r
40 }