From fd6838164120ff30f76780f6478dcb0e04983ee9 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期六, 10 八月 2024 15:10:15 +0800 Subject: [PATCH] 采购退料,优化代码 --- MES.Service/util/AppsettingsUtility.cs | 11 +++-------- 1 files changed, 3 insertions(+), 8 deletions(-) diff --git a/MES.Service/util/AppsettingsUtility.cs b/MES.Service/util/AppsettingsUtility.cs index f769cc0..eabb6b4 100644 --- a/MES.Service/util/AppsettingsUtility.cs +++ b/MES.Service/util/AppsettingsUtility.cs @@ -5,20 +5,15 @@ public class AppsettingsUtility { - private static AppSettings _appSettings; - - public static AppSettings Settings - { - get { return _appSettings; } - } + public static AppSettings Settings { get; private set; } public void Initial(IConfiguration configuration) { - AppSettings myOwn = new AppSettings(); + var myOwn = new AppSettings(); //娉ㄦ剰锛氬彲浠ヤ娇鐢ㄥ啋鍙锋潵鑾峰彇鍐呭眰鐨勯厤缃」 myOwn.TestErpUrl = configuration["AppSettings:TestErpUrl"]; myOwn.ProductionErpUrl = configuration["AppSettings:ProductionErpUrl"]; myOwn.DataBaseConn = configuration["AppSettings:DataBaseConn"]; - _appSettings = myOwn; + Settings = myOwn; } } \ No newline at end of file -- Gitblit v1.9.3