static void Main(string[] args) { AMediator aMediator = new AMediator(); RegisterPersonHandler(aMediator); //TODO: Request Bob Helper.PrintResult("Bob", null /*TODO: Insert result object*/); //TODO: Request Peter Helper.PrintResult("Peter", null /*TODO: Insert result object*/); }
private static void RegisterPersonHandler(AMediator amediator) { Dictionary <string, Person> allPersons = new Dictionary <string, Person> { ["Bob"] = new Person() { Name = "Bob", Email = "*****@*****.**", Age = 35 }, }; amediator.RegisterHandler((PersonRequest x) => { // TODO: Implement handler logic return(new PersonResponse(null)); }); }