示例#1
0
        private void ExecuteRunnerAction(RunnerAction runnerAction)
        {
            Console.WriteLine("Chosen action is: " + runnerAction.LongName);

            var client = TdlClient.Build()
                         .SetHostname(hostname)
                         .SetUniqueId(username)
                         .SetAuditStream(new ConsoleAuditStream())
                         .Create();

            var processingRules = new ProcessingRules();

            processingRules
            .On("display_description")
            .Call(p => RoundManagement.SaveDescription(p[0], p[1]))
            .Then(ClientActions.Publish);

            foreach (var solution in solutions)
            {
                processingRules
                .On(solution.Key)
                .Call(solution.Value)
                .Then(runnerAction.ClientAction);
            }

            client.GoLiveWith(processingRules);

            RecordingSystem.NotifyEvent(RoundManagement.GetLastFetchedRound(), runnerAction.ShortName);
        }
示例#2
0
 public ClientRunner WithActionIfNoArgs(RunnerAction defaultRunnerAction)
 {
     this.defaultRunnerAction = defaultRunnerAction;
     return(this);
 }