Files
mapo-core/MP.IOC/Services/IWeightProvider.cs
T
Samuele Locatelli 3d61c0924b Fix chiamata awaits
2026-04-10 10:00:57 +02:00

32 lines
928 B
C#

namespace MP.IOC.Services
{
public class WeightDTO
{
public string Method { get; set; } = "";
public int OldWeight { get; set; } = 100;
public int NewWeight { get; set; } = 0;
}
public interface IWeightProvider
{
/// <summary>
/// Ritorna la coppia (oldWeight, newWeight) per scegliere dove instradare il metodo tra i 2 sistemi API.
/// </summary>
(int oldWeight, int newWeight) GetWeightsFor(string method);
/// <summary>
/// Ritorna l'intero elenco dei weight attivi nel formato WeightDTO
/// </summary>
/// <returns></returns>
Task<List<WeightDTO>> GetAllWeightsAsync();
/// <summary>
/// Aggiorna/Aggiuinge il valore del weight richiesto
/// </summary>
/// <param name=""></param>
/// <returns></returns>
bool UpsertWeight(WeightDTO updRecord);
}
}