-
Notifications
You must be signed in to change notification settings - Fork 0
Update.Check()
cTrader GURU edited this page Feb 26, 2020
·
3 revisions
Fornisce metodi e informazioni per il controllo degli aggiornamenti dei prodotti.
cTrader_GURU.Update.Check (JsonPostParam request_config, string current_endpoint = "https://ctrader.guru/_getinfo_/")
| Tipo | Parametro | Descrizione | Default |
|---|---|---|---|
| JsonPostParam | request_config | parametri POST per la richiesta | * |
| string | current_endpoint | L'indirizzo della pagina API per la richiesta | # https://ctrader.guru/_getinfo_/ |
using cAlgo.API;
using cTrader_GURU.Update;
namespace cAlgo.Robots
{
[Robot(TimeZone = TimeZones.UTC, AccessRights = AccessRights.FullAccess)]
public class TestDLL : Robot
{
[Parameter(DefaultValue = 0.0)]
public double Parameter { get; set; }
private const string VERSION = "1.0.0";
private const int PRODUCTID = 70590;
protected override void OnStart()
{
Check MyCheck = new Check(new JsonPostParam
{
AccountBroker = Account.BrokerName,
AccountNumber = Account.Number,
MyVersion = VERSION,
ProductID = PRODUCTID
});
if (MyCheck.HaveError())
{
Print( "Ci sono errori : {0}", MyCheck.ProductInformation.Exp );
Print( "Risposta del server : {0}", MyCheck.ProductInformation.Server_Response);
}
else if (MyCheck.HaveNewUpdate())
{
Print("Ci sono aggiornamenti, la nuova versione {0} è stata rilasciata il {1}", MyCheck.ProductInformation.Version, MyCheck.ProductInformation.Updated);
}
else
{
Print("Non ci sono aggiornamenti disponibili");
}
}
}
}
cTrader_GURU
cTrader_GURU.Web
cTrader_GURU.Update
cTrader_GURU.Font