public void Start() { _serviceProvider = new ServiceCollection().AddAppServices().ConfigureContainer(); _server = _serviceProvider.AddGrpcServices(); _server.Start(); }
public async Task StartAsync(CancellationToken cancellationToken) { Logger.LogInformation("Starting application2"); // Logger.LogInformation("Environment: {0}", _hostingEnvironment.EnvironmentName); _server = _serviceProvider.AddGrpcServices(_loggerFactory, Configuration.GetValue <int>("Port")); _server.Start(); }
public Task StartAsync(CancellationToken cancellationToken) { Logger.LogInformation("Starting application"); Logger.LogInformation("Environment: {0}", _hostingEnvironment.EnvironmentName); _server = _serviceProvider.AddGrpcServices(_loggerFactory, _configuration); _server.Start(); return(Task.CompletedTask); }