-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConnections.cs
More file actions
33 lines (27 loc) · 1.1 KB
/
Connections.cs
File metadata and controls
33 lines (27 loc) · 1.1 KB
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
using Flash.Configuration.Core;
namespace Flash.Configuration.WebApi.Configuration;
[FlashOrder(3)]
[FlashConfig("Connections", environment: "Development")]
[FlashConfig("Connections", environment: "Staging")]
public class Connections
{
[FlashProperty("UserService", isComplex: true)]
public UserService UserService { get; } = new();
}
[FlashSection]
public class UserService
{
[FlashProperty("BaseUrl")]
[FlashValue("https://dev.api.localhost", environment: "Development")]
[FlashValue("https://staging.api.localhost", environment: "Staging")]
public string BaseUrl { get; set; } = string.Empty;
[FlashProperty("RelativeUrl")]
[FlashValue("api/users/v1", environment: "Development")]
[FlashValue("api/users/v1", environment: "Staging")]
public string RelativeUrl { get; set; } = string.Empty;
[FlashProperty("SwaggerUrl")]
[FlashValue("api/users/v1", environment: "Development")]
[FlashValue("api/users/v1", environment: "Staging")]
public string SwaggerUrl { get; set; } = string.Empty;
public string GetFullUrl() => string.Concat(BaseUrl, "/", RelativeUrl);
}