Implement MachineKey.Protect and MachineKey.Unprotect
[mono.git] / mcs / class / System.ComponentModel.Composition / src / ComponentModel / System / ComponentModel / Composition / Hosting / DirectoryCatalog.DirectoryCatalogDebuggerProxy.cs
1 // -----------------------------------------------------------------------\r
2 // Copyright (c) Microsoft Corporation.  All rights reserved.\r
3 // -----------------------------------------------------------------------\r
4 #if !SILVERLIGHT\r
5 \r
6 using System;\r
7 using System.Collections.ObjectModel;\r
8 using System.ComponentModel.Composition.Primitives;\r
9 using System.ComponentModel.Composition.ReflectionModel;\r
10 using System.Linq;\r
11 using System.Reflection;\r
12 using Microsoft.Internal;\r
13 using Microsoft.Internal.Collections;\r
14 \r
15 namespace System.ComponentModel.Composition.Hosting\r
16 {\r
17     partial class DirectoryCatalog\r
18     {\r
19         internal class DirectoryCatalogDebuggerProxy\r
20         {\r
21             private readonly DirectoryCatalog _catalog;\r
22 \r
23             public DirectoryCatalogDebuggerProxy(DirectoryCatalog catalog)\r
24             {\r
25                 Requires.NotNull(catalog, "catalog");\r
26 \r
27                 this._catalog = catalog;\r
28             }\r
29 \r
30             public ReadOnlyCollection<Assembly> Assemblies\r
31             {\r
32                 get\r
33                 {\r
34                     return this._catalog._assemblyCatalogs.Values.Select(catalog => catalog.Assembly)\r
35                                                                  .ToReadOnlyCollection();\r
36                 }\r
37             }\r
38 \r
39             public string SearchPattern\r
40             {\r
41                 get { return this._catalog.SearchPattern; }\r
42             }\r
43 \r
44             public string Path\r
45             {\r
46                 get { return this._catalog._path; }\r
47             }\r
48 \r
49             public string FullPath\r
50             {\r
51                 get { return this._catalog._fullPath; }\r
52             }\r
53 \r
54             public ReadOnlyCollection<string> LoadedFiles\r
55             {\r
56                 get { return this._catalog._loadedFiles; }\r
57             }\r
58 \r
59             public ReadOnlyCollection<ComposablePartDefinition> Parts\r
60             {\r
61                 // NOTE: This shouldn't be cached, so that on every query of\r
62                 // the current value of the underlying catalog is respected.\r
63                 // We use ReadOnlyCollection as arrays do not have the \r
64                 // appropriate debugger display attributes applied to them.\r
65                 get { return this._catalog.Parts.ToReadOnlyCollection(); }\r
66             }\r
67         }\r
68     }\r
69 }\r
70 \r
71 #endif