private void Handle( ValidateArgs msg ) { if ( String.IsNullOrEmpty( msg.Folders ) ) { Sender.Tell( new InvalidArgs( "Folders argument is empty." ) ); } if ( Directory.Exists( msg.Folders ) ) { var extension = msg.Extension; if ( String.IsNullOrEmpty( extension ) ) { extension = "*.txt"; } Sender.Tell( new ValidateArgs( msg.Folders, extension ) ); } else { Sender.Tell( new StatusMessage( String.Format( "Invalid Folder [{0}] [{1}]", msg.Folders, msg.Extension ) ) ); } }
private void Handle( ValidateArgs msg ) { fileEnumerator.Tell( new EnumerateFiles( msg.Folders, msg.Extension ) ); }