diff --git a/.gitignore b/.gitignore index a4d8ada..3499559 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.dll +*.userprefs packages/ bin/ obj/ diff --git a/NOCQ.userprefs b/NOCQ.userprefs index 32bfcce..f305c2c 100644 --- a/NOCQ.userprefs +++ b/NOCQ.userprefs @@ -1,22 +1,14 @@  - + - - - + + - - - - - - - - + diff --git a/src/NOCQ/Imports/IDataImportHook.cs b/src/NOCQ/Imports/IDataImportHook.cs index e4c37be..ada4c45 100644 --- a/src/NOCQ/Imports/IDataImportHook.cs +++ b/src/NOCQ/Imports/IDataImportHook.cs @@ -3,7 +3,7 @@ using System.ComponentModel.Composition; namespace NOCQ { - [Export(typeof(IDataImportHook))] + [InheritedExport] public interface IDataImportHook { string Name { get; set; } diff --git a/src/NOCQ/NOCQ.csproj b/src/NOCQ/NOCQ.csproj index 913d1a1..75b8f50 100644 --- a/src/NOCQ/NOCQ.csproj +++ b/src/NOCQ/NOCQ.csproj @@ -54,6 +54,7 @@ ..\..\packages\AE.Net.Mail.1.7.9.1\lib\net45\AE.Net.Mail.dll + diff --git a/src/NOCQ/Plugins/Email/EmailSettings.cs b/src/NOCQ/Plugins/Email/EmailSettings.cs index bdfdb0e..295d427 100644 --- a/src/NOCQ/Plugins/Email/EmailSettings.cs +++ b/src/NOCQ/Plugins/Email/EmailSettings.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; namespace NOCQ.Plugins.Email { diff --git a/src/NOCQ/Plugins/Email/ImapInput.cs b/src/NOCQ/Plugins/Email/ImapInput.cs index 67159e2..35f0855 100644 --- a/src/NOCQ/Plugins/Email/ImapInput.cs +++ b/src/NOCQ/Plugins/Email/ImapInput.cs @@ -1,6 +1,8 @@ using System; using System.Timers; using AE.Net.Mail; +using System.Collections.Generic; +using System.Linq; namespace NOCQ.Plugins.Email { @@ -14,7 +16,7 @@ namespace NOCQ.Plugins.Email private int port { get; set; } private bool ssl { get; set; } private DateTime lastRun { get; set; } - private IEnumerable parseRules{ get; set; } + private List parseRules{ get; set; } public ImapInput (dynamic settings) { @@ -23,22 +25,18 @@ namespace NOCQ.Plugins.Email if (sets.Username == null || sets.Password == null || sets.Host == null - || sets.Folder == null - || sets.Frequency == null - || sets.Port == null - || sets.IsSsl == null) + || sets.Folder == null) throw new ArgumentException ("You are missing a required setting."); - parseRules = sets.ParseRules.Where (x => x.Enabled); + parseRules = sets.ParseRules.Where (x => x.Enabled).ToList(); - loginName = settings.Login; - password = settings.Password; - server = settings.Server; - folderPath = settings.FolderPath; + loginName = sets.Username; + password = sets.Password; + server = sets.Host; + folderPath = sets.Folder; - timer = new Timer (settings.Frequency); - - timer.Elapsed += Execute (); + timer = new Timer (sets.Frequency); + //timer.Elapsed += Execute (); }