mirror of
https://github.com/snltty/linker.git
synced 2025-10-04 16:52:48 +08:00
33 lines
901 B
C#
33 lines
901 B
C#
using linker.messenger.signin;
|
|
using linker.messenger.relay.client.transport;
|
|
|
|
namespace linker.messenger.relay.server.validator
|
|
{
|
|
public sealed partial class RelayServerValidatorTransfer
|
|
{
|
|
private List<IRelayServerValidator> validators;
|
|
|
|
public RelayServerValidatorTransfer()
|
|
{
|
|
}
|
|
|
|
public void LoadValidators(List<IRelayServerValidator> list)
|
|
{
|
|
validators = list;
|
|
}
|
|
|
|
public async Task<string> Validate(RelayInfo relayInfo, SignCacheInfo cache, SignCacheInfo cache1)
|
|
{
|
|
foreach (var item in validators)
|
|
{
|
|
string result = await item.Validate(relayInfo, cache, cache1);
|
|
if (string.IsNullOrWhiteSpace(result) == false)
|
|
{
|
|
return result;
|
|
}
|
|
}
|
|
return string.Empty;
|
|
}
|
|
}
|
|
}
|