-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSystemConfig.cs
More file actions
82 lines (72 loc) · 2.04 KB
/
Copy pathSystemConfig.cs
File metadata and controls
82 lines (72 loc) · 2.04 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
using Akka.Configuration;
namespace DroneSystemAPI
{
[Obsolete("Not used any more", true)]
public abstract class SystemConfigs
{
public virtual string SystemName { get; set; } = "DroneDeliverySystem";
public abstract string ActorName { get; set; }
public string SpawnerActor { get; } = "spawner";
public virtual string HostName { get; set; } = "localhost";
public virtual int Port { get; set; } = 0;
public Config Config
{
get
{
var hocon = @$"
akka {{
loglevel = WARNING
actor {{
provider = remote
}}
remote {{
dot-netty.tcp {{
port = {Port}
hostname = {HostName}
}}
}}
}}";
return ConfigurationFactory.ParseString(hocon);
}
}
public static SystemConfigs RepositoryConfig
{
get
{
return new DroneRepositoryConfig();
}
}
public static SystemConfigs DroneConfig
{
get
{
return new DroneSystemConfig();
}
}
public static SystemConfigs GenericConfig
{
get
{
return new GenericConfig();
}
}
}
[Obsolete("Not used any more", true)]
internal class DroneSystemConfig : SystemConfigs
{
public override string SystemName { get; set; } = "DroneActorSystem";
public override string ActorName { get; set; } = "Drone";
}
[Obsolete("Not used any more", true)]
internal class DroneRepositoryConfig : SystemConfigs
{
public override string SystemName { get; set; } = "RepositoryActorSystem";
public override string ActorName { get; set; } = "Repository";
public override int Port { get; set; } = 8080;
}
[Obsolete("Not used any more", true)]
internal class GenericConfig : SystemConfigs
{
public override string ActorName { get; set; } = string.Empty;
}
}