using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace IStation.BLL
|
{
|
public class ServiceParas
|
{
|
private static bool _isInitial = false;
|
|
private static bool _isRemote = true;
|
private static string _apiServiceUrl = null;
|
public static string ApiServiceUrl
|
{
|
get
|
{
|
if (_isInitial)
|
{
|
return _apiServiceUrl;
|
}
|
_isInitial = true;
|
var isStr = System.Configuration.ConfigurationManager.AppSettings["IsRemote"];
|
if(isStr != null)
|
{
|
_isRemote = Convert.ToBoolean(isStr);
|
}
|
_apiServiceUrl = System.Configuration.ConfigurationManager.AppSettings["ApiServiceUrl"];
|
return _apiServiceUrl;
|
}
|
}
|
public static bool IsRemote
|
{
|
get
|
{
|
if (_isInitial)
|
{
|
return _isRemote;
|
}
|
_isInitial = true;
|
var isStr = System.Configuration.ConfigurationManager.AppSettings["IsRemote"];
|
if (isStr != null)
|
{
|
_isRemote = Convert.ToBoolean(isStr);
|
}
|
else
|
{
|
_isRemote = false;
|
}
|
_apiServiceUrl = System.Configuration.ConfigurationManager.AppSettings["ApiServiceUrl"];
|
return _isRemote;
|
}
|
}
|
|
}
|
}
|