This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user