-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathProgram.cs
More file actions
46 lines (40 loc) · 1.45 KB
/
Program.cs
File metadata and controls
46 lines (40 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
namespace PathApi.Client
{
using System;
using Grpc.Core;
using PathApi.V1;
class Program
{
static void Main(string[] args)
{
Channel channel = new Channel("path.grpc.razza.dev:443", ChannelCredentials.Insecure);
var client = new Stations.StationsClient(channel);
var rclient = new Routes.RoutesClient(channel);
var reply = client.GetUpcomingTrains(new GetUpcomingTrainsRequest()
{
Station = Station.GroveStreet
});
Console.WriteLine(reply.ToString());
Console.WriteLine();
var reply2 = client.GetStation(new GetStationRequest()
{
Station = Station.GroveStreet
});
Console.WriteLine(reply2.ToString());
Console.WriteLine();
var reply3 = client.ListStations(new ListStationsRequest());
Console.WriteLine(reply3.ToString());
Console.WriteLine();
var reply4 = rclient.ListRoutes(new ListRoutesRequest());
Console.WriteLine(reply4.ToString());
Console.WriteLine();
var reply5 = rclient.GetRoute(new GetRouteRequest()
{
Route = Route.Jsq33
});
Console.WriteLine(reply5.ToString());
Console.WriteLine();
channel.ShutdownAsync().Wait();
}
}
}