Ejemplo n.º 1
0
		public async void GetGRPCServiceTest()
		{
			_conn = new GRPCConnection(_balancer, _grpcServiceFinder);
			var grpcService = await _conn.GetGRPCService<IGrpcService>(string.Empty);

			Assert.Null(grpcService);
		}
Ejemplo n.º 2
0
		public void GRPCConnectionTest()
		{
			Assert.Throws<AngleExceptions>(() =>
			{
				_conn = new GRPCConnection(null, null);
			});

			_conn = new GRPCConnection(_balancer, _grpcServiceFinder);
			Assert.NotNull(_conn);
		}
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            IGRPCConnection conn        = new GRPCConnection(null, null);
            var             grpcService = new MicroAngels.GRPC.Client.GRPCService("192.168.1.8", 1999);
            var             service     = conn.GetGRPCService <IPingService>(grpcService).Result;
            var             pong        = service.Ping(new Ping {
                Message = "Hello GRPC"
            });

            Console.WriteLine("Client Received:" + pong.ResponseAsync.Result.Message);

            Console.ReadLine();
        }