4 |
|
using System.Text; |
5 |
|
using RomCheater.PluginFramework.Interfaces; |
6 |
|
using RomCheater.Logging; |
7 |
+ |
using System.IO; |
8 |
|
|
9 |
|
namespace RomCheater.PluginFramework.Core |
10 |
|
{ |
21 |
|
public void LoadPlugins() |
22 |
|
{ |
23 |
|
logger.Info.WriteLine("Loading Plugins..."); |
24 |
< |
logger.Info.WriteLine("Plguins Loaded."); |
24 |
> |
|
25 |
> |
string PluginPath = string.Format(@"{0}\Plugins", typeof(PluginLoader).Assembly.Location.Replace(@"\RomCheater.PluginFramework.dll", "")); |
26 |
> |
logger.Debug.WriteLine("Plugins Path: {0}", PluginPath); |
27 |
> |
List<string> dlls = new List<string>(Directory.GetFiles(PluginPath, "*.dll")); |
28 |
> |
logger.Debug.WriteLine(" Found: {0} plugin dlls", dlls.Count); |
29 |
> |
foreach (string dll in dlls) |
30 |
> |
{ |
31 |
> |
FileInfo fi = new FileInfo(dll); |
32 |
> |
logger.Debug.WriteLine(" plugin[{0}]: {1}", dlls.IndexOf(dll), fi.Name); |
33 |
> |
} |
34 |
> |
logger.Info.WriteLine("Plugins Loaded."); |
35 |
|
} |
36 |
|
public List<IConfigPlugin> LoadedConfigPlugins { get; private set; } |
37 |
|
public List<IInputPlugin> LoadedInputPlugins { get; private set; } |