ホテル管理システム
ogi
yesterday 1a1c8e71fcd14858f595029f089b2d4a00202b32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using HotelPms.Share.Util;
 
namespace HotelPms.GrpcService.Util
{
    public class Setting
    {
        /// <summary>
        /// 共通DB
        /// </summary>
        public static string HotelCommonDB { get; set; } = string.Empty;
 
        /// <summary>
        /// 施設DB
        /// </summary>
        public static string HotelPmsDB { get; set; } = string.Empty;
 
        /// <summary>
        /// クラウド管理DB
        /// </summary>
        public static string SystemCenterDB { get; set; } = string.Empty;
 
        public static string JwtIssuer { get; set; } = string.Empty;
 
        public static string JwtAudience { get; set; } = string.Empty;
 
        public static string JwtSecurityKey { get; set; } = string.Empty;
 
        public static int GrpcPort { get; set; } = 0;
 
        public static int ApiPort { get; set; } = 0;
 
        /// <summary>
        /// 初期化
        /// </summary>
        /// <param name="app"></param>
        /// <param name="configuration"></param>
        public static void Init(IConfiguration configuration)
        {
            Setting.HotelPmsDB = configuration.GetSection("ConnectionStrings:HotelPmsDB").Value;
            Setting.HotelCommonDB = configuration.GetSection("ConnectionStrings:HotelCommonDB").Value;
            Setting.SystemCenterDB = configuration.GetSection("ConnectionStrings:SystemManagementCenterDB").Value;
            JwtIssuer = configuration["JwtIssuer"];
            JwtAudience = configuration["JwtAudience"];
            JwtSecurityKey = configuration["JwtSecurityKey"];
            GrpcPort = CConvert.ToInt(configuration["GrpcPort"]);
            ApiPort = CConvert.ToInt(configuration["ApiPort"]);
        }
    }
}