diff --git a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md index e73456d4b..183b537f6 100644 --- a/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md +++ b/daprdocs/content/en/developing-applications/building-blocks/service-invocation/howto-invoke-discover-services.md @@ -191,25 +191,24 @@ using System.Threading; //code namespace EventService { - class Program - { - static async Task Main(string[] args) - { - while(true) { - System.Threading.Thread.Sleep(5000); - Random random = new Random(); - int orderId = random.Next(1,1000); - CancellationTokenSource source = new CancellationTokenSource(); - CancellationToken cancellationToken = source.Token; - using var client = new DaprClientBuilder().Build(); - //Using Dapr SDK to invoke a method - var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId, cancellationToken); - await client.InvokeMethodAsync(result); - Console.WriteLine("Order requested: " + orderId); - Console.WriteLine("Result: " + result); - } - } - } + class Program + { + static async Task Main(string[] args) + { + while(true) { + System.Threading.Thread.Sleep(5000); + Random random = new Random(); + int orderId = random.Next(1,1000); + using var client = new DaprClientBuilder().Build(); + + //Using Dapr SDK to invoke a method + var result = client.CreateInvokeMethodRequest(HttpMethod.Get, "checkout", "checkout/" + orderId); + await client.InvokeMethodAsync(result); + Console.WriteLine("Order requested: " + orderId); + Console.WriteLine("Result: " + result); + } + } + } } ```