Exemplo n.º 1
0
 public HttpServer(
     HostBuilderOptions hostOptions,
     SfConfig config,
     IApplicationLifetime applicationLifetime)
 {
     _hostOptions         = hostOptions;
     _config              = config;
     _applicationLifetime = applicationLifetime;
 }
 public HttpServer(
     HostBuilderOptions hostOptions,
     SfConfig config,
     IHostApplicationLifetime applicationLifetime,
     IClipboard clipboard)
 {
     _hostOptions         = hostOptions;
     _config              = config;
     _applicationLifetime = applicationLifetime;
     _clipboard           = clipboard;
 }
Exemplo n.º 3
0
        public static Task Run(string[] args, HostBuilderOptions hostBuilderOptions = null)
        {
            var hostBuilder = Host
                              .CreateDefaultBuilder()
                              .UseDefaultConfigurations(args);

            hostBuilderOptions?.Invoke(hostBuilder);
            return(hostBuilder
                   .Build()
                   .RunAsync());
        }