Example #1
0
 public IActionResult UnregisterAgent(
     [FromBody] int agentId,
     [FromServices] AgentRegistratorService agentRegistrator)
 {
     agentRegistrator.Unregister(agentId);
     return(Ok());
 }
Example #2
0
 public IActionResult RegisterAgent(
     [FromBody] AgentInfo agentInfo,
     [FromServices] AgentRegistratorService agentRegistrator)
 {
     agentRegistrator.Register(agentInfo);
     return(Ok());
 }
Example #3
0
 public async Task <IActionResult> GetAgentsAsync([FromServices] AgentRegistratorService agentRegistrator)
 {
     return(Ok(await agentRegistrator.GetRegisteredAsync()));
 }