static void Main(string[] args) { Console.WriteLine("Starting Client..."); var Port = 50051; var PortVar = System.Environment.GetEnvironmentVariable("SERVER_PORT"); if (!String.IsNullOrEmpty(PortVar)) { Port = Int32.Parse(PortVar); } var channel = new Channel("127.0.0.1:" + Port, ChannelCredentials.Insecure); var routeGuideClient = new RouteGuide.RouteGuide.RouteGuideClient(channel); var client = new Client(routeGuideClient); // Looking for a valid feature client.GetFeature(409146138, -746188906); // Feature missing. client.GetFeature(0, 0); // Looking for features between 40, -75 and 42, -73. client.ListFeatures(400000000, -750000000, 420000000, -730000000).Wait(); // Record a few randomly selected points from the features file. client.RecordRoute(RouteGuideUtil.ParseFeatures(RouteGuideUtil.DefaultFeaturesFile), 10).Wait(); // Send and receive some notes. client.RouteChat().Wait(); channel.ShutdownAsync().Wait(); }
static void Main(string[] args) { Console.WriteLine("Starting Client..."); var channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure); var routeGuideClient = new RouteGuide.RouteGuide.RouteGuideClient(channel); var client = new Client(routeGuideClient); // Looking for a valid feature client.GetFeature(409146138, -746188906); // Feature missing. client.GetFeature(0, 0); // Looking for features between 40, -75 and 42, -73. client.ListFeatures(400000000, -750000000, 420000000, -730000000).Wait(); // Record a few randomly selected points from the features file. client.RecordRoute(RouteGuideUtil.ParseFeatures(RouteGuideUtil.DefaultFeaturesFile), 10).Wait(); // Send and receive some notes. client.RouteChat().Wait(); channel.ShutdownAsync().Wait(); }
public Client(RouteGuide.RouteGuide.RouteGuideClient client) { this.client = client; }