// This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // AspNetLib による設定を追加
            AspNetLib.ConfigureServices(StartupHelper, services);

            // 基本的な設定を追加
            StartupHelper.ConfigureServices(services);

            // リクエスト数制限機能を追加
            services.AddHttpRequestRateLimiter <HttpRequestRateLimiterHashKeys.SrcIPAddress>(_ => { });

            //// Cookie 認証機能を追加
            EasyCookieAuth.LoginFormMessage.TrySet("ログインが必要です。");
            EasyCookieAuth.AuthenticationPasswordValidator = StartupHelper.SimpleBasicAuthenticationPasswordValidator;
            EasyCookieAuth.ConfigureServices(services, !StartupHelper.ServerOptions.AutomaticRedirectToHttpsIfPossible);

            // LogBrowesr 機能を設定
            AspNetLib.SetupLogBrowser(services, new LogBrowserOptions(PP.Combine(Env.AppRootDir, "Log"), "DaemonCenter Server 本体ログブラウザ"));

            // MVC 機能を追加
            services.AddControllersWithViews()
            .ConfigureMvcWithAspNetLib(AspNetLib);

            this.DaemonCenterServer = new Server();

            // シングルトンサービスの注入
            services.AddSingleton(this.DaemonCenterServer);

            // Daemon Center RPC 独立ポートサーバーの作成
            this.DaemonCenterRpcHost = new DaemonCenterServerRpcHttpHost(this.DaemonCenterServer);

            // 全ページ共通コンテキストの注入
            services.AddScoped <PageContext>();
        }
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            // AspNetLib による設定を追加
            AspNetLib.ConfigureServices(StartupHelper, services);

            // 基本的な設定を追加
            StartupHelper.ConfigureServices(services);

            // リクエスト数制限機能を追加
            services.AddHttpRequestRateLimiter <HttpRequestRateLimiterHashKeys.SrcIPAddress>(_ => { });

            ////// Cookie 認証機能を追加
            //EasyCookieAuth.LoginFormMessage.TrySet("ログインが必要です。");
            //EasyCookieAuth.AuthenticationPasswordValidator = StartupHelper.SimpleBasicAuthenticationPasswordValidator;
            //EasyCookieAuth.ConfigureServices(services, !StartupHelper.ServerOptions.AutomaticRedirectToHttpsIfPossible);

            // MVC 機能を追加
            services.AddControllersWithViews()
            .ConfigureMvcWithAspNetLib(AspNetLib);

            // シングルトンサービスの注入
            //services.AddSingleton(new Server());

            // 全ページ共通コンテキストの注入
            //services.AddScoped<PageContext>();
        }