src/Unit-1/DoThis/ConsoleReaderActor.cs
/// <summary>
/// Reads input from console, validates it, then signals appropriate response
/// (continue processing, error, success, etc.).
/// </summary>
Reads input from console, validates it, then signals appropriate response
(continue processing, error, success, etc.).
Reads input from console validates it then signals appropriate response ( continue processing error success etc . ) .
private void GetAndValidateInput()
        {
            var message = Console.ReadLine();
            if (!string.IsNullOrEmpty(message) && (String.Equals(message, ExitCommand, StringComparison.OrdinalIgnoreCase)))
            {
                Context.System.Terminate();
                return;
            }
            Context.ActorSelection("akka://MyActorSystem/user/validationActor").Tell(message);
        }
private void GetAndValidateInput ( ) { var message = Console . ReadLine ( ) ; if ( ! string . IsNullOrEmpty ( message ) && ( String . Equals ( message , ExitCommand , StringComparison . OrdinalIgnoreCase ) ) ) { Context . System . Terminate ( ) ; return ; } Context . ActorSelection ( " " ) . Tell ( message ) ; }
Reads input from console, validates it, then signals appropriate response
(continue processing, error, success, etc.
Reads input from console validates it then signals appropriate response ( continue processing error success etc .
// if user typed ExitCommand, shut down the entire actor // system (allows the process to exit) // otherwise, just hand message off to validation actor // (by telling its actor ref)