// POST api/values public void Post() { var closeEventCommand = new CloseEventCommand(){ Events = FakeEvents(), Comment = "Fechando por teste", EndDate = DateTime.Now.AddDays(-1), Progress = 100, UpdateTime = DateTime.Now, Username = "******" }; this.commandDispatcher.Dispatch<CloseEventCommand, CloseEventCommandResult>(closeEventCommand); }
// GET api/values public IEnumerable<string> Get() { var closeEventCommand = new CloseEventCommand() { Events = FakeEvents(), Comment = "Fechando por teste", EndDate = DateTime.Now.AddDays(-1), Progress = 100, UpdateTime = DateTime.Now, Username = "******" }; this.commandDispatcher.Dispatch<CloseEventCommand, CloseEventCommandResult>(closeEventCommand); return new string[] { "value1", "value2" }; }