4648
This commit is contained in:
22
util.cs
22
util.cs
@@ -28,8 +28,8 @@ namespace raven_integration
|
||||
public static class Util
|
||||
{
|
||||
//#######################################################################################################
|
||||
//public static string API_BASE_URL = "http://localhost:7575/api/v8/";
|
||||
public static string API_BASE_URL = "https://devtest.ayanova.com/api/v8.0/";
|
||||
public static string API_BASE_URL = "http://localhost:7575/api/v8/";
|
||||
//public static string API_BASE_URL = "https://devtest.onayanova.com/api/v8.0/";
|
||||
|
||||
public static string TEST_DATA_FOLDER = @"..\..\..\testdata\";
|
||||
//#######################################################################################################
|
||||
@@ -107,16 +107,20 @@ namespace raven_integration
|
||||
|
||||
|
||||
|
||||
static bool bInitialized = false;
|
||||
static volatile bool bInitialized = false;
|
||||
private static readonly object _initLock = new object();
|
||||
private static void init()
|
||||
{
|
||||
if (bInitialized) return;
|
||||
if (!System.IO.Directory.Exists(TEST_DATA_FOLDER))
|
||||
throw new ArgumentOutOfRangeException($"Test data folder {TEST_DATA_FOLDER} not found, current folder is {System.AppDomain.CurrentDomain.BaseDirectory}");
|
||||
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
bInitialized = true;
|
||||
lock (_initLock)
|
||||
{
|
||||
if (bInitialized) return;
|
||||
if (!System.IO.Directory.Exists(TEST_DATA_FOLDER))
|
||||
throw new ArgumentOutOfRangeException($"Test data folder {TEST_DATA_FOLDER} not found, current folder is {System.AppDomain.CurrentDomain.BaseDirectory}");
|
||||
client.DefaultRequestHeaders.Accept.Clear();
|
||||
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
|
||||
bInitialized = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static string CleanApiRoute(string route)
|
||||
|
||||
Reference in New Issue
Block a user