-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathProgram.cs
33 lines (26 loc) · 905 Bytes
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
using System;
using Akka.Actor;
namespace WinTailC
{
class Program
{
static ActorSystem WinTailSystem;
static void Main(string[] args)
{
WinTailSystem = ActorSystem.Create("WinTailSystem");
var consoleWriterRef = WinTailSystem.ActorOf(
Props.Create(() => new ConsoleWriterActor())
);
var inputValidatorRef = WinTailSystem.ActorOf(
Props.Create(() => new InputValidatorActor(consoleWriterRef))
);
var consoleReaderRef = WinTailSystem.ActorOf(
Props.Create(() => new ConsoleReaderActor(inputValidatorRef))
);
Console.WriteLine("Enter some input");
consoleReaderRef.Tell(new ContinueProcessing());
WinTailSystem.WhenTerminated.Wait();
Console.WriteLine("Goodbye...");
}
}
}