private void Reciever() { if (networkUnit != null && networkUnit.IsWork) { Request request = new Request(networkUnit.Recieve()); workCore.Run(request); } }
public void CoreTest() { var commandExample = new SummCommand(); var builderExample = new ResponseBuilder(); var pipelineExample = new CommandResponsePipeline(); RequestWorker workerExample = new RequestWorker("summ", pipelineExample, commandExample, builderExample); RequestWorkerSet workerSet = new RequestWorkerSet(); workerSet.AddRequestWorkers(workerExample); WorkCore core = new WorkCore(workerSet); core.Run("summ:10,20"); Assert.AreEqual("30", commandExample.Work().GetObject <string>(VALUE_VARIABLE_NAME)); Assert.AreEqual("30", builderExample.GetResponse().Value); }