- Merge aicom-network-fixes up to r36740
[reactos.git] / irc / TechBot / TechBot.Console / ConsoleTechBotService.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Text;
4
5 using TechBot.Library;
6
7 namespace TechBot.Console
8 {
9 public class ConsoleServiceOutput : IServiceOutput
10 {
11 public void WriteLine(MessageContext context,
12 string message)
13 {
14 System.Console.WriteLine(message);
15 }
16 }
17
18 public class ConsoleTechBotService : TechBotService
19 {
20 public ConsoleTechBotService()
21 : base(new ConsoleServiceOutput())
22 {
23 System.Console.WriteLine("TechBot running console service...");
24 }
25
26 public override void Run()
27 {
28 //Call the base class
29 base.Run();
30
31 while (true)
32 {
33 InjectMessage(System.Console.ReadLine());
34 }
35 }
36 }
37 }