文件名从 Service/HStation.Service.Assets.Core/03-settings/00-core/XhsFileHelper.cs 修改 |
| | |
| | | |
| | | namespace HStation.Settings |
| | | { |
| | | internal class XhsFileHelper |
| | | internal class AssetsFileHelper |
| | | { |
| | | /// <summary> |
| | | /// json鏂囦欢鍚嶇О |
| | |
| | | /// <summary> |
| | | /// 鑾峰彇 |
| | | /// </summary> |
| | | internal static XhsParas Get() |
| | | internal static AssetsParas Get() |
| | | { |
| | | if (_appparas == null) |
| | | { |
| | |
| | | if (_appparas == null) |
| | | { |
| | | var json = File.ReadAllText(JsonFileName, Encoding.UTF8); |
| | | _appparas = JsonHelper.Json2Object<XhsParas>(json); |
| | | _appparas = JsonHelper.Json2Object<AssetsParas>(json); |
| | | if (_appparas == null) |
| | | { |
| | | _appparas = new XhsParas(); |
| | | _appparas = new AssetsParas(); |
| | | } |
| | | } |
| | | } |
| | |
| | | return _appparas; |
| | | } |
| | | |
| | | private static XhsParas _appparas = null; |
| | | private static AssetsParas _appparas = null; |
| | | private static readonly object _locker = new object(); |
| | | |
| | | /// <summary> |