ancora rimozione chaimate async
This commit is contained in:
@@ -62,7 +62,7 @@ namespace MP.IOC.Controllers
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("DatiMacc")]
|
||||
public string DatiMacc(string id)
|
||||
public async Task<string> DatiMacc(string id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -77,8 +77,7 @@ namespace MP.IOC.Controllers
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
Dictionary<string, string> valori = DService.mDatiMacchine(id);
|
||||
//Dictionary<string, string> valori = DService.ResetDatiMacchina(id);
|
||||
Dictionary<string, string> valori = await DService.mDatiMacchineAsync(id);
|
||||
foreach (var item in valori)
|
||||
{
|
||||
answ += $"{item.Key}|{item.Value}{Environment.NewLine}";
|
||||
@@ -154,7 +153,7 @@ namespace MP.IOC.Controllers
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("InsEnab")]
|
||||
public string InsEnab(string id)
|
||||
public async Task<string> InsEnab(string id)
|
||||
{
|
||||
string answ = "ND";
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
@@ -167,13 +166,8 @@ namespace MP.IOC.Controllers
|
||||
else
|
||||
{
|
||||
// recupero microstato macchina da chiave relativa
|
||||
answ = "";
|
||||
try
|
||||
{
|
||||
answ += $"Macchina {id}, insEnabled {DService.IobInsEnab(id)}{Environment.NewLine}";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
var insEnab = await DService.IobInsEnabAsync(id);
|
||||
answ = $"Macchina {id}, insEnabled {insEnab}{Environment.NewLine}";
|
||||
}
|
||||
stopWatch.Stop();
|
||||
// Get the elapsed time as a TimeSpan value.
|
||||
|
||||
Reference in New Issue
Block a user