Esempio n. 1
0
        private void OnSetRootDirectoryFromCommandLineArgumentsIfExists(SetRootDirectoryFromCommandLineArgumentsIfExists message)
        {
            try
            {
                var commandLineArgsParserActor = Context.ActorOf(ActorRegistry.CommandLineArgsParser);

                _commandLineArgsParser.GetRootDirectoryFromCommandLine(commandLineArgsParserActor)
                .ContinueWith(rootDirectoryTask =>
                {
                    var directory = rootDirectoryTask.Result;
                    return(new Internal.GetRootDirectoryFromCommandLineResult(directory));
                }).PipeTo(Self);
            }
            catch (Exception ex)
            {
                Log.Msg(this, l => l.Error(ex));
            }
        }
Esempio n. 2
0
        private void OnSetRootDirectoryFromCommandLineArgumentsIfExists(SetRootDirectoryFromCommandLineArgumentsIfExists message)
        {
            try
            {
                var commandLineArgsParserActor = Context.ActorOf(ActorRegistry.CommandLineArgsParser);

                _commandLineArgsParser.GetRootDirectoryFromCommandLine(commandLineArgsParserActor)
                    .ContinueWith(rootDirectoryTask =>
                    {
                        var directory = rootDirectoryTask.Result;
                        return new Internal.GetRootDirectoryFromCommandLineResult(directory);

                    }).PipeTo(Self);
            }
            catch (Exception ex)
            {
                Log.Msg(this, l => l.Error(ex));
            }
        }