コード例 #1
0
ファイル: SydneyService.cs プロジェクト: arnath/sydney
        public SydneyService(SydneyServiceConfig config, ILogger logger)
        {
            this.config = config ?? throw new ArgumentNullException(nameof(config));
            this.logger = logger ?? throw new ArgumentNullException(nameof(logger));

            config.Validate();

            this.httpListener = new HttpListener();
            this.router       = new Router();

            this.fullPrefixFormat = $"{config.Scheme}://{config.Host}:{config.Port}/{{0}}";
        }
コード例 #2
0
ファイル: SydneyService.cs プロジェクト: arnath/sydney
 public SydneyService(SydneyServiceConfig config)
     : this(config, NullLogger.Instance)
 {
 }