public static NeoloadRestApiInstance GetInstance()
 {
     if (_instance == null)
     {
         Dictionary <string, string> properties = NeoLoadSettings.ReadSettingsFromUserFile();
         string host  = properties[NeoLoadSettings.API_HOSTNAME_KEY];
         string port  = properties[NeoLoadSettings.API_PORT_KEY];
         string token = properties[NeoLoadSettings.API_KEY_KEY];
         TCAPI_VERSION = properties[NeoLoadSettings.TCAPI_VERSION];
         _instance     = new NeoloadRestApiInstance(host, port, token);
     }
     return(_instance);
 }
Exemplo n.º 2
0
 public static NeoLoadDesignApiInstance GetInstance()
 {
     if (_instance == null)
     {
         Dictionary <string, string> properties = NeoLoadSettings.ReadSettingsFromUserFile();
         string   host  = properties[NeoLoadSettings.API_HOSTNAME_KEY];
         string   port  = properties[NeoLoadSettings.API_PORT_KEY];
         string   token = properties[NeoLoadSettings.API_KEY_KEY];
         bool     createTransactionBySapTCode = Boolean.Parse(properties[NeoLoadSettings.CREATE_TRANSACTION_BY_SAP_TCODE_KEY]);
         Protocol protocolToRecord            = (Protocol)Enum.Parse(typeof(Protocol), properties[NeoLoadSettings.RECORD_WEB_OR_SAP]);
         _instance = new NeoLoadDesignApiInstance(host, port, token, createTransactionBySapTCode, protocolToRecord);
         _instance.intialize();
     }
     return(_instance);
 }