mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 05:43:30 +00:00
ac77d9d3a6
- Made TechBot more configurable through .config files - Code refactoring - Removed automatic parameter parsing support to make everyone happy svn path=/trunk/; revision=33586
37 lines
833 B
C#
37 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());
|
|
}
|
|
}
|
|
}
|
|
}
|