17 lines
491 B
C#
17 lines
491 B
C#
using RPG.Network.Proto;
|
|
|
|
namespace RPG.Services.Core.Options;
|
|
public class ServiceNodeOptions : List<ServiceNodeOptions.Entry>
|
|
{
|
|
public class Entry
|
|
{
|
|
public required RPGServiceType Type { get; set; }
|
|
public required string Host { get; set; }
|
|
public required int Port { get; set; }
|
|
}
|
|
|
|
public Entry GetEntry(RPGServiceType type)
|
|
{
|
|
return Find(e => e.Type == type) ?? throw new ArgumentException("Entry not found", nameof(type));
|
|
}
|
|
}
|