From b63f2eb3f788684a6a2317e04de789f9bb41bffc Mon Sep 17 00:00:00 2001 From: Aaron Yarborough Date: Fri, 10 Feb 2017 15:03:44 +0000 Subject: [PATCH] Testing script manager --- BankingBot/ActionManagers/LoginManagers/LoginManager.cs | 6 +++++- BankingBot/BankingBot.csproj | 8 ++++++-- BankingBot/ScriptManagement/ScriptBundles.cs | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/BankingBot/ActionManagers/LoginManagers/LoginManager.cs b/BankingBot/ActionManagers/LoginManagers/LoginManager.cs index 836d3c5..4e98965 100644 --- a/BankingBot/ActionManagers/LoginManagers/LoginManager.cs +++ b/BankingBot/ActionManagers/LoginManagers/LoginManager.cs @@ -3,6 +3,7 @@ using System.Linq; using BankingBot.Attributes; using BankingBot.Contracts; using BankingBot.Responses; +using BankingBot.ScriptManagement; namespace BankingBot.ActionManagers.LoginManagers { @@ -14,8 +15,11 @@ namespace BankingBot.ActionManagers.LoginManagers public Response Login(ILoginCredentials credentials) { + // TODO: THIS NEEDS TO BE MOVED + var scriptManager = new ScriptManager(BrowserBot); + var provLoginManagerType = GetActionTypeFromInterface(credentials, typeof(IProviderLoginManager)); - var provLoginManager = (IProviderLoginManager)Activator.CreateInstance(provLoginManagerType, BrowserBot); + var provLoginManager = (IProviderLoginManager)Activator.CreateInstance(provLoginManagerType, BrowserBot, scriptManager); return provLoginManager.Login(credentials); } diff --git a/BankingBot/BankingBot.csproj b/BankingBot/BankingBot.csproj index f6a53cd..fbdaff6 100644 --- a/BankingBot/BankingBot.csproj +++ b/BankingBot/BankingBot.csproj @@ -77,8 +77,12 @@ - - + + PreserveNewest + + + PreserveNewest + diff --git a/BankingBot/ScriptManagement/ScriptBundles.cs b/BankingBot/ScriptManagement/ScriptBundles.cs index a019aab..7175ef5 100644 --- a/BankingBot/ScriptManagement/ScriptBundles.cs +++ b/BankingBot/ScriptManagement/ScriptBundles.cs @@ -10,8 +10,8 @@ namespace BankingBot.ScriptManagement { public static string[] Global => new[] { - "jquery-3.1.1.min", - "global.js" + "scripts/jquery-3.1.1.min", + "scripts/global.js" }; } }