예제 #1
0
        public QuicConnectionFactory(IOptions <QuicTransportOptions> options, ILoggerFactory loggerFactory)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            var logger = loggerFactory.CreateLogger("Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Client");
            var trace  = new QuicTrace(logger);

            _transportContext = new QuicTransportContext(trace, options.Value);
        }
        public QuicTransportFactory(ILoggerFactory loggerFactory, IOptions <QuicTransportOptions> options)
        {
            if (options == null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            var logger = loggerFactory.CreateLogger("Microsoft.AspNetCore.Server.Kestrel.Transport.Quic");

            _log     = new QuicTrace(logger);
            _options = options.Value;
        }