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