From ec940136d37633995ab4c1e8bf1e343005170647 Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 7 May 2014 09:29:54 -0700 Subject: [PATCH 1/2] 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 From 1c6548bba60e850a66fc405ec91470e3b6df56cc Mon Sep 17 00:00:00 2001 From: Tommy Parnell Date: Wed, 7 May 2014 09:35:21 -0700 Subject: [PATCH 2/2] IDataImport plugin --- src/NOCQ/Imports/IDataImport.cs | 11 +++++++++++ src/NOCQ/NOCQ.csproj | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 src/NOCQ/Imports/IDataImport.cs diff --git a/src/NOCQ/Imports/IDataImport.cs b/src/NOCQ/Imports/IDataImport.cs new file mode 100644 index 0000000..9d609a0 --- /dev/null +++ b/src/NOCQ/Imports/IDataImport.cs @@ -0,0 +1,11 @@ +using System; + +namespace NOCQ +{ + public interface IDataImport + { + void Run(); + void Stop(); + } +} + diff --git a/src/NOCQ/NOCQ.csproj b/src/NOCQ/NOCQ.csproj index 65b7bcf..f1187a6 100644 --- a/src/NOCQ/NOCQ.csproj +++ b/src/NOCQ/NOCQ.csproj @@ -52,6 +52,7 @@ + @@ -59,5 +60,6 @@ + \ No newline at end of file