435 lines
14 KiB
C#
435 lines
14 KiB
C#
using System;
|
||
using System.Collections.Generic;
|
||
using System.Configuration;
|
||
using System.Linq;
|
||
using System.Text;
|
||
using System.Threading.Tasks;
|
||
|
||
namespace CodeBuilderApi.Config
|
||
{
|
||
/// <summary>
|
||
/// 系统配置参数
|
||
/// </summary>
|
||
public class AppSettings
|
||
{
|
||
#region 综管平台地址(前后端分离项目)
|
||
internal const string _EShangApiMainUrls = "https://api.eshangtech.com/EShangApiMain";
|
||
/// <summary>
|
||
/// 综管平台地址(前后端分离项目)
|
||
/// </summary>
|
||
public static string EShangApiMainUrls
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["EShangApiMainUrls"] == null)
|
||
{
|
||
return _EShangApiMainUrls;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["EShangApiMainUrls"];
|
||
}
|
||
|
||
}
|
||
}
|
||
|
||
internal const string _EShangApiWisdomUrls = "https://api.eshangtech.com/EShangApiWisdom";
|
||
/// <summary>
|
||
/// 智慧服务区平台地址(前后端分离项目)
|
||
/// </summary>
|
||
public static string EShangApiWisdomUrls
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["EShangApiWisdomUrls"] == null)
|
||
{
|
||
return _EShangApiWisdomUrls;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["EShangApiWisdomUrls"];
|
||
}
|
||
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region WCF字段生成代码地址,根据发布地址调整配置
|
||
//WCF服务文件默认目录
|
||
internal const string _WCFServiceDir = @"D:\Project\000_通用版本\000_通用版本\001_框架权限\FrameWork.Test.Service";
|
||
/// <summary>
|
||
/// WCF服务文件目录
|
||
/// </summary>
|
||
public static string WCFServiceDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["WCFServiceDir"] == null)
|
||
{
|
||
return _WCFServiceDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["WCFServiceDir"];
|
||
}
|
||
}
|
||
}
|
||
//WCF对象文件默认目录
|
||
internal const string _WCFModelDir = @"D:\Project\000_通用版本\000_通用版本\001_框架权限\FrameWork.Test.Model\FrameWork.Test.Model";
|
||
/// <summary>
|
||
/// WCF对象文件目录
|
||
/// </summary>
|
||
public static string WCFModelDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["WCFModelDir"] == null)
|
||
{
|
||
return _WCFModelDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["WCFModelDir"];
|
||
}
|
||
}
|
||
}
|
||
//WCF接口文件默认目录
|
||
internal const string _WCFInterfaceDir = @"D:\Project\000_通用版本\000_通用版本\001_框架权限\FrameWork.Test.Model\FrameWork.Test.Interface";
|
||
/// <summary>
|
||
/// WCF接口文件目录
|
||
/// </summary>
|
||
public static string WCFInterfaceDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["WCFInterfaceDir"] == null)
|
||
{
|
||
return _WCFInterfaceDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["WCFInterfaceDir"];
|
||
}
|
||
}
|
||
}
|
||
//WCF引用文件默认目录
|
||
internal const string _WCFReferencesDir = @"D:\Project\000_通用版本\000_通用版本\001_框架权限\FrameWork.Test.References\FrameWork.Test.References";
|
||
/// <summary>
|
||
/// WCF引用文件目录
|
||
/// </summary>
|
||
public static string WCFReferencesDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["WCFReferencesDir"] == null)
|
||
{
|
||
return _WCFReferencesDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["WCFReferencesDir"];
|
||
}
|
||
}
|
||
}
|
||
//WCF业务层文件默认目录
|
||
internal const string _WCFBusinessDir = @"D:\Project\000_通用版本\000_通用版本\001_框架权限\FrameWork.Test.Business\FrameWork.Test.Business";
|
||
/// <summary>
|
||
/// WCF业务层文件目录
|
||
/// </summary>
|
||
public static string WCFBusinessDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["WCFBusinessDir"] == null)
|
||
{
|
||
return _WCFBusinessDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["WCFBusinessDir"];
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 低代码平台接口地址,根据发布地址调整配置
|
||
//接口文件默认目录
|
||
internal const string _CodeBuilderApi = "http://dev.eshangtech.com:8001/EShangApiMain/";
|
||
/// <summary>
|
||
/// 接口文件目录
|
||
/// </summary>
|
||
public static string CodeBuilderApi
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["CodeBuilderApi"] == null)
|
||
{
|
||
return _CodeBuilderApi;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["CodeBuilderApi"];
|
||
}
|
||
}
|
||
}
|
||
|
||
//代码编译结果的日志文件所在目录
|
||
internal const string _CodeBuilderLogAbsUrl = @"D:\Project\000_通用版本\000_通用版本\030_EShangApi\CodeBuilder\log";
|
||
/// <summary>
|
||
/// 接口文件目录
|
||
/// </summary>
|
||
public static string CodeBuilderLogAbsUrl
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["CodeBuilderLogAbsUrl"] == null)
|
||
{
|
||
return _CodeBuilderApi;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["CodeBuilderLogAbsUrl"];
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region API接口文件,根据发布地址调整配置
|
||
//接口文件默认目录
|
||
internal const string _ControllerPath = "D:\\01_系统发布\\000_Project\\000_通用版本\\030_EShangApi\\EShangApiMain\\Controllers";
|
||
/// <summary>
|
||
/// 接口文件目录
|
||
/// </summary>
|
||
public static string ControllerPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["ControllerPath"] == null)
|
||
{
|
||
return _ControllerPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["ControllerPath"];
|
||
}
|
||
}
|
||
}
|
||
//接口相关方法文件默认目录
|
||
internal const string _HelperPath = "D:\\01_系统发布\\000_Project\\000_通用版本\\030_EShangApi\\EShangApi.Common";
|
||
/// <summary>
|
||
/// 接口相关方法文件目录
|
||
/// </summary>
|
||
public static string HelperPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["HelperPath"] == null)
|
||
{
|
||
return _HelperPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["HelperPath"];
|
||
}
|
||
}
|
||
}
|
||
//接口相关对象文件默认目录
|
||
internal const string _ModelPath = "D:\\01_系统发布\\000_Project\\000_通用版本\\030_EShangApi\\EShangApi.Common";
|
||
/// <summary>
|
||
/// 接口相关对象文件目录
|
||
/// </summary>
|
||
public static string ModelPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["ModelPath"] == null)
|
||
{
|
||
return _ModelPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["ModelPath"];
|
||
}
|
||
}
|
||
}
|
||
//msbuild程序默认路径
|
||
internal const string _msbuildPath = @"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\amd64\msbuild.exe";
|
||
/// <summary>
|
||
/// msbuild程序路径,用于自动编译接口代码
|
||
/// </summary>
|
||
public static string msbuildPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["msbuildPath"] == null)
|
||
{
|
||
return _msbuildPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["msbuildPath"];
|
||
}
|
||
}
|
||
}
|
||
//要编译的解决方案默认路径
|
||
internal const string _slnPath = @"D:\01_系统发布\000_Project\000_通用版本\030_EShangApi\EShangApi.sln";
|
||
/// <summary>
|
||
/// 要编译的解决方案路径
|
||
/// </summary>
|
||
public static string slnPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["slnPath"] == null)
|
||
{
|
||
return _slnPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["slnPath"];
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 前端页面文件,根据发布地址调整配置
|
||
//前端页面文件夹目录默认路径
|
||
internal const string _SolutionPath = "D:\\01_系统发布\\999_PublishWebSite\\cloud-platform\\src";
|
||
/// <summary>
|
||
/// 前端页面文件夹目录
|
||
/// </summary>
|
||
public static string SolutionPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["SolutionPath"] == null)
|
||
{
|
||
return _SolutionPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["SolutionPath"];
|
||
}
|
||
}
|
||
}
|
||
//前端页面文件文件夹默认名称
|
||
internal const string _IndexPageDir = "Test";
|
||
/// <summary>
|
||
/// 前端页面文件文件夹名称
|
||
/// </summary>
|
||
public static string IndexPageDir
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["IndexPageDir"] == null)
|
||
{
|
||
return _IndexPageDir;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["IndexPageDir"];
|
||
}
|
||
}
|
||
}
|
||
//前端页面路由文件默认路径
|
||
internal const string _RoutePath = "D:\\01_系统发布\\999_PublishWebSite\\cloud-platform\\config";
|
||
/// <summary>
|
||
/// 前端页面路由文件路径
|
||
/// </summary>
|
||
public static string RoutePath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["RoutePath"] == null)
|
||
{
|
||
return _RoutePath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["RoutePath"];
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 小程序文件,根据发布地址调整配置
|
||
//小程序页面代码文件默认目录
|
||
internal const string _MiniProgramPath = "D:\\Project\\002_GitLab\\wechat_yxcl";
|
||
/// <summary>
|
||
/// 小程序页面代码文件目录
|
||
/// </summary>
|
||
public static string MiniProgramPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["MiniProgramPath"] == null)
|
||
{
|
||
return _MiniProgramPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["MiniProgramPath"];
|
||
}
|
||
}
|
||
}
|
||
//小程序路由文件默认目录
|
||
internal const string _PagesJsonPath = "D:\\Project\\002_GitLab\\wechat_yxcl";
|
||
/// <summary>
|
||
/// 小程序路由文件目录
|
||
/// </summary>
|
||
public static string PagesJsonPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["PagesJsonPath"] == null)
|
||
{
|
||
return _PagesJsonPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["PagesJsonPath"];
|
||
}
|
||
}
|
||
}
|
||
//自动打包后,存放小程序打包文件的默认目录
|
||
internal const string _PackPath = "D:\\uniapp_preview\\src";
|
||
/// <summary>
|
||
/// 自动打包后,存放小程序打包文件的目录
|
||
/// </summary>
|
||
public static string PackPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["PackPath"] == null)
|
||
{
|
||
return _PackPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["PackPath"];
|
||
}
|
||
}
|
||
}
|
||
//自动打包小程序的批处理文件默认路径
|
||
internal const string _apkPath = @"D:\uniapp_preview\buildapk.bat";
|
||
/// <summary>
|
||
/// 自动打包小程序的批处理文件路径
|
||
/// </summary>
|
||
public static string apkPath
|
||
{
|
||
get
|
||
{
|
||
if (ConfigurationManager.AppSettings["apkPath"] == null)
|
||
{
|
||
return _apkPath;
|
||
}
|
||
else
|
||
{
|
||
return ConfigurationManager.AppSettings["apkPath"];
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
}
|
||
}
|