-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDotEnv.cs
36 lines (28 loc) · 1.2 KB
/
DotEnv.cs
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
namespace ocian_net
{
public class DotEnv
{
public string SERVER { get; set; }
public string PORT { get; set; }
public string DATABASE_NAME { get; set; }
public string DB_USER { get; set; }
public string DB_PASSWORD { get; set; }
public string HOST { get; set; }
public string USERNAME { get; set; }
public string PASSWORD { get; set; }
public string EMAIL { get; set; }
public DotEnv()
{
DotNetEnv.Env.Load();
SERVER = Environment.GetEnvironmentVariable("SERVER")!;
PORT = Environment.GetEnvironmentVariable("PORT")!;
DATABASE_NAME = Environment.GetEnvironmentVariable("DATABASE_NAME")!;
DB_USER = Environment.GetEnvironmentVariable("DB_USER")!;
DB_PASSWORD = Environment.GetEnvironmentVariable("DB_PASSWORD")!;
HOST = Environment.GetEnvironmentVariable("HOST")!;
USERNAME = Environment.GetEnvironmentVariable("USERNAME")!;
PASSWORD = Environment.GetEnvironmentVariable("PASSWORD")!;
EMAIL = Environment.GetEnvironmentVariable("EMAIL")!;
}
}
}