using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using YamlDotNet.Core.Tokens; namespace IOB_UT_NEXT.Config.Base { public class ServerMapoDto { /// /// Restituisce la API del comando richiesto dalla BaseUrl /// /// Comando richiesto da comporre /// public string ApiUrl(string CmdReq) { // default ad implicito con IOB... string answ = $"{BaseAppUrl}IOB/{CmdReq}/"; if (Commands.ContainsKey(CmdReq)) { answ = $"{BaseAppUrl}{Commands[CmdReq]}"; } // elimino doppie barre answ = answ.Replace("//", "/"); return answ; } /// /// URL Base del server applicativo /// public string BaseAppUrl { get; set; } = "/MP/IO/"; /// /// Disabilitazione ping verso server /// public bool DisabPing { get; set; } = false; /// /// Disabilitazione keepalive aggiungendo opzione in URL /// public bool DisabKeepAlive { get; set; } = false; /// /// Dizionario comandi configurati /// public Dictionary Commands { get; set; } = new CmdUriDto("IOB").StdCommands(); /// /// Directory Installazione di riferimento x applicativi MAN/IOB sotto la radice C:\ /// public string ClientInstall { get; set; } = "SteamWare"; /// /// Indirizzo IP server /// public string IpAddr { get; set; } = "127.0.0.1"; /// /// Indica il metodo di trasporto http/https /// public string Transport { get; set; } = "http"; } }