From ec940136d37633995ab4c1e8bf1e343005170647 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 7 May 2014 09:29:54 -0700 Subject: [PATCH] basic catalog --- NOCQ.userprefs | 6 +----- src/NOCQ/Extensability/Catalog.cs | 19 +++++++++++++++++++ src/NOCQ/NOCQ.csproj | 4 ++++ 3 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 src/NOCQ/Extensability/Catalog.cs diff --git a/NOCQ.userprefs b/NOCQ.userprefs index 8ada366..8a063db 100644 --- a/NOCQ.userprefs +++ b/NOCQ.userprefs @@ -1,10 +1,6 @@  - - - - - + diff --git a/src/NOCQ/Extensability/Catalog.cs b/src/NOCQ/Extensability/Catalog.cs new file mode 100644 index 0000000..f58656e --- /dev/null +++ b/src/NOCQ/Extensability/Catalog.cs @@ -0,0 +1,19 @@ +using System.ComponentModel.Composition.Hosting; +using System.ComponentModel.Composition; + +namespace NOCQ +{ + public class Catalog + { + DirectoryCatalog dcatalog = new DirectoryCatalog("plugins", "*.dll"); + AssemblyCatalog acatalog = new AssemblyCatalog(Assembly.GetExecutingAssembly()); + AggregateCatalog catalog = new AggregateCatalog(dcatalog, acatalog); + public CompositionContainer Container = new CompositionContainer(catalog); + public Catalog() + { + Container.ComposeParts(this); + + } + } +} + diff --git a/src/NOCQ/NOCQ.csproj b/src/NOCQ/NOCQ.csproj index a39c206..65b7bcf 100644 --- a/src/NOCQ/NOCQ.csproj +++ b/src/NOCQ/NOCQ.csproj @@ -51,9 +51,13 @@ + + + + \ No newline at end of file