Ejemplo n.º 1
0
        private void Start()
        {
            var mongoDbService       = new MongoDbService();
            var historyServiceServer = new BettingHistoryRpcServer(mongoDbService);

            var server = new Server
            {
                Services = { Bettingv1HisotryService.BindService(historyServiceServer) },
                Ports    = { new ServerPort("localhost", 50058, ServerCredentials.Insecure) }
            };

            server.Start();

            while (true)
            {
                var input = Console.ReadLine();
                if (input?.ToLower() == "exit")
                {
                    break;
                }
            }
        }
Ejemplo n.º 2
0
 public BettingHistoryRpcServer(MongoDbService mongoDbService)
 {
     _mongoDbService = mongoDbService;
 }