mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 01:48:11 +00:00
![Marc Piulachs](/assets/img/avatar_default.png)
- Made TechBot more configurable through .config files - Code refactoring - Removed automatic parameter parsing support to make everyone happy svn path=/trunk/; revision=33586
38 lines
833 B
C#
38 lines
833 B
C#
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()
|
|
: base(new ConsoleServiceOutput())
|
|
{
|
|
System.Console.WriteLine("TechBot running console service...");
|
|
}
|
|
|
|
public override void Run()
|
|
{
|
|
//Call the base class
|
|
base.Run();
|
|
|
|
while (true)
|
|
{
|
|
InjectMessage(System.Console.ReadLine());
|
|
}
|
|
}
|
|
}
|
|
}
|