1 // -----------------------------------------------------------------------
\r
2 // Copyright (c) Microsoft Corporation. All rights reserved.
\r
3 // -----------------------------------------------------------------------
\r
7 using System.Collections.ObjectModel;
\r
8 using System.ComponentModel.Composition.Primitives;
\r
9 using System.ComponentModel.Composition.ReflectionModel;
\r
11 using System.Reflection;
\r
12 using Microsoft.Internal;
\r
13 using Microsoft.Internal.Collections;
\r
15 namespace System.ComponentModel.Composition.Hosting
\r
17 partial class DirectoryCatalog
\r
19 internal class DirectoryCatalogDebuggerProxy
\r
21 private readonly DirectoryCatalog _catalog;
\r
23 public DirectoryCatalogDebuggerProxy(DirectoryCatalog catalog)
\r
25 Requires.NotNull(catalog, "catalog");
\r
27 this._catalog = catalog;
\r
30 public ReadOnlyCollection<Assembly> Assemblies
\r
34 return this._catalog._assemblyCatalogs.Values.Select(catalog => catalog.Assembly)
\r
35 .ToReadOnlyCollection();
\r
39 public string SearchPattern
\r
41 get { return this._catalog.SearchPattern; }
\r
46 get { return this._catalog._path; }
\r
49 public string FullPath
\r
51 get { return this._catalog._fullPath; }
\r
54 public ReadOnlyCollection<string> LoadedFiles
\r
56 get { return this._catalog._loadedFiles; }
\r
59 public ReadOnlyCollection<ComposablePartDefinition> Parts
\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