25 lines
764 B
Plaintext
25 lines
764 B
Plaintext
using ShrinkNetwork;
|
|
|
|
namespace ShrinkNetwork.ServerHost.Framework;
|
|
|
|
public sealed class ServerModuleContext
|
|
{
|
|
private readonly Dictionary<string, ShrinkNetworkService> _services = new(StringComparer.OrdinalIgnoreCase);
|
|
|
|
public ServerModuleContext(ServerHostOptions options, ServerAuthStore authStore)
|
|
{
|
|
Options = options;
|
|
AuthStore = authStore;
|
|
}
|
|
|
|
public ServerHostOptions Options { get; }
|
|
public ServerAuthStore AuthStore { get; }
|
|
public UnityNetworkScanManifest? ScanManifest { get; set; }
|
|
public IReadOnlyDictionary<string, ShrinkNetworkService> Services => _services;
|
|
|
|
public void RegisterService(string transportName, ShrinkNetworkService service)
|
|
{
|
|
_services[transportName] = service;
|
|
}
|
|
}
|