Files
mapo-core/MP.IOC/Services/IWeightProvider.cs
T
2026-04-10 08:50:55 +02:00

32 lines
917 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>
List<WeightDTO> GetAllWeights();
/// <summary>
/// Aggiorna/Aggiuinge il valore del weight richiesto
/// </summary>
/// <param name=""></param>
/// <returns></returns>
bool UpsertWeight(WeightDTO updRecord);
}
}