1
// -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 // -----------------------------------------------------------------------
7 using System
.Collections
.ObjectModel
;
8 using System
.ComponentModel
.Composition
.Primitives
;
9 using System
.ComponentModel
.Composition
.ReflectionModel
;
11 using System
.Reflection
;
12 using Microsoft
.Internal
;
13 using Microsoft
.Internal
.Collections
;
15 namespace System
.ComponentModel
.Composition
.Hosting
17 partial class DirectoryCatalog
19 internal class DirectoryCatalogDebuggerProxy
21 private readonly DirectoryCatalog _catalog
;
23 public DirectoryCatalogDebuggerProxy(DirectoryCatalog catalog
)
25 Requires
.NotNull(catalog
, "catalog");
27 this._catalog
= catalog
;
30 public ReadOnlyCollection
<Assembly
> Assemblies
34 return this._catalog
._assemblyCatalogs
.Values
.Select(catalog
=> catalog
.Assembly
)
35 .ToReadOnlyCollection();
39 public string SearchPattern
41 get { return this._catalog.SearchPattern; }
46 get { return this._catalog._path; }
49 public string FullPath
51 get { return this._catalog._fullPath; }
54 public ReadOnlyCollection
<string> LoadedFiles
56 get { return this._catalog._loadedFiles; }
59 public ReadOnlyCollection
<ComposablePartDefinition
> Parts
61 // NOTE: This shouldn't be cached, so that on every query of
62 // the current value of the underlying catalog is respected.
63 // We use ReadOnlyCollection as arrays do not have the
64 // appropriate debugger display attributes applied to them.
65 get { return this._catalog.Parts.ToReadOnlyCollection(); }