mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
- code refactoring
- made more and more easily extensible: * commands automatically loaded from plugins dlls * declarative and automatic command parameter parsing * common code moved to base classes - other fixes svn path=/trunk/; revision=33344
This commit is contained in:
parent
e3407fdd9c
commit
d7b2077ed8
42 changed files with 2263 additions and 1689 deletions
39
irc/TechBot/TechBot.Console/ConsoleTechBotService.cs
Normal file
39
irc/TechBot/TechBot.Console/ConsoleTechBotService.cs
Normal file
|
@ -0,0 +1,39 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
using TechBot.Library;
|
||||
|
||||
namespace TechBot.Console
|
||||
{
|
||||
public class ConsoleServiceOutput : IServiceOutput
|
||||
{
|
||||
public void WriteLine(MessageContext context,
|
||||
string message)
|
||||
{
|
||||
System.Console.WriteLine(message);
|
||||
}
|
||||
}
|
||||
|
||||
public class ConsoleTechBotService : TechBotService
|
||||
{
|
||||
public ConsoleTechBotService(
|
||||
string chmPath,
|
||||
string mainChm)
|
||||
: base(new ConsoleServiceOutput(), chmPath, mainChm)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Run()
|
||||
{
|
||||
//Call the base class
|
||||
base.Run();
|
||||
|
||||
while (true)
|
||||
{
|
||||
string s = System.Console.ReadLine();
|
||||
InjectMessage(null, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue