-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathTransportConfig.cs
More file actions
26 lines (23 loc) · 1.33 KB
/
TransportConfig.cs
File metadata and controls
26 lines (23 loc) · 1.33 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
using BuslyCLI.Config.Transports;
using YamlDotNet.Serialization;
namespace BuslyCLI.Config;
public class TransportConfig
{
public string Name { get; set; }
public LearningTransportConfig LearningTransportConfig { get; set; }
public RabbitmqTransportConfig RabbitmqTransportConfig { get; set; }
public AmazonsqsTransportConfig AmazonsqsTransportConfig { get; set; }
public AzureServiceBusTransportConfig AzureServiceBusTransportConfig { get; set; }
public AzureStorageQueuesTransportConfig AzureStorageQueuesTransportConfig { get; set; }
public SqlServerTransportConfig SqlServerTransportConfig { get; set; }
public PostgreSqlTransportConfig PostgreSqlTransportConfig { get; set; }
// Helper property to unify config access:
[YamlIgnore]
public ITransportConfig Config => (ITransportConfig)LearningTransportConfig
?? (ITransportConfig)RabbitmqTransportConfig
?? (ITransportConfig)AmazonsqsTransportConfig
?? (ITransportConfig)AzureServiceBusTransportConfig
?? (ITransportConfig)AzureStorageQueuesTransportConfig
?? (ITransportConfig)SqlServerTransportConfig
?? PostgreSqlTransportConfig;
}