示例#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
文件: App.cs 项目: videa-tv/kickstart
        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);
        }