update MEF to preview 9
[mcs.git] / class / System.ComponentModel.Composition / src / ComponentModel / System / ComponentModel / Composition / Hosting / DirectoryCatalog.DirectoryCatalogDebuggerProxy.cs
blob074cf6166d808bd6718e6be14eaf98e3ba18ea03
1 // -----------------------------------------------------------------------
2 // Copyright (c) Microsoft Corporation. All rights reserved.
3 // -----------------------------------------------------------------------
4 #if !SILVERLIGHT
6 using System;
7 using System.Collections.ObjectModel;
8 using System.ComponentModel.Composition.Primitives;
9 using System.ComponentModel.Composition.ReflectionModel;
10 using System.Linq;
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
32 get
34 return this._catalog._assemblyCatalogs.Values.Select(catalog => catalog.Assembly)
35 .ToReadOnlyCollection();
39 public string SearchPattern
41 get { return this._catalog.SearchPattern; }
44 public string Path
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(); }
71 #endif