/// <summary> /// Create a new server on endpoint with packet handler repository /// </summary> public RadiusServer(Configuration configuration, IRadiusPacketParser radiusPacketParser, CacheService cacheService, ILogger logger) { _configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); _radiusPacketParser = radiusPacketParser ?? throw new ArgumentNullException(nameof(radiusPacketParser)); _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _localEndpoint = configuration.ServiceServerEndpoint; _router = new RadiusRouter(configuration, radiusPacketParser, logger); }
/// <summary> /// Create a new server on endpoint with packet handler repository /// </summary> public RadiusServer(ServiceConfiguration serviceConfiguration, IRadiusDictionary dictionary, IRadiusPacketParser radiusPacketParser, CacheService cacheService, ILogger logger) { _serviceConfiguration = serviceConfiguration ?? throw new ArgumentNullException(nameof(serviceConfiguration)); _dictionary = dictionary ?? throw new ArgumentNullException(nameof(dictionary)); _radiusPacketParser = radiusPacketParser ?? throw new ArgumentNullException(nameof(radiusPacketParser)); _cacheService = cacheService ?? throw new ArgumentNullException(nameof(cacheService)); _logger = logger ?? throw new ArgumentNullException(nameof(logger)); _localEndpoint = serviceConfiguration.ServiceServerEndpoint; _router = new RadiusRouter(serviceConfiguration, radiusPacketParser, logger); }