projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- Moved commands outside TechBot.Library to TechBot.Commands.Common and TechBot.Comma...
[reactos.git]
/
irc
/
TechBot
/
TechBot.Library
/
Factory
/
CommandFactory.cs
diff --git
a/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
b/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
index
34e3471
..
100bd2b
100644
(file)
--- a/
irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
+++ b/
irc/TechBot/TechBot.Library/Factory/CommandFactory.cs
@@
-18,11
+18,9
@@
namespace TechBot.Library
public static void LoadPlugins()
{
//get the file names of the dll files in the current directory.
public static void LoadPlugins()
{
//get the file names of the dll files in the current directory.
- FileInfo objExeInfo = new FileInfo(@"C:\Ros\current\irc\TechBot\TechBot.Console\bin\Debug\");
-
- foreach (FileInfo objInfo in objExeInfo.Directory.GetFiles("*.dll"))
+ foreach (string fileName in Directory.GetFiles(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "*.dll"))
{
{
- LoadPluginsFromDLLFile(
objInfo.Full
Name);
+ LoadPluginsFromDLLFile(
file
Name);
}
}
}
}
@@
-30,6
+28,8
@@
namespace TechBot.Library
{
Assembly assPlugin = Assembly.LoadFile(sFile);
{
Assembly assPlugin = Assembly.LoadFile(sFile);
+ Console.WriteLine("Loading plugins from : {0}", assPlugin.Location);
+
if (assPlugin != null)
{
foreach (Type pluginType in assPlugin.GetTypes())
if (assPlugin != null)
{
foreach (Type pluginType in assPlugin.GetTypes())
@@
-38,6
+38,12
@@
namespace TechBot.Library
{
if (pluginType.IsAbstract == false)
{
{
if (pluginType.IsAbstract == false)
{
+ CommandBuilder cmdBuilder = new CommandBuilder(pluginType);
+
+ Console.WriteLine("{0}:{1}",
+ cmdBuilder.Name,
+ cmdBuilder.Description);
+
//Add it to the list.
Commands.Add(new CommandBuilder(pluginType));
}
//Add it to the list.
Commands.Add(new CommandBuilder(pluginType));
}