Пример #1
0
        public void Start()
        {
            _serviceProvider = new ServiceCollection().AddAppServices().ConfigureContainer();

            _server = _serviceProvider.AddGrpcServices();
            _server.Start();
        }
Пример #2
0
        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();
        }
Пример #3
0
        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);
        }