async IAsyncEnumerable<string> MakeHttpCall()
{
var watch = System.Diagnostics.Stopwatch.StartNew();
int Count = 0;
using (var reader = new StreamReader(@"C:\Users\kosta\source\repos\gRPCDemoUsingNET6\gRPCDemoUsingNET6\Data\sales_records.csv"))
{
while (watch.Elapsed < TimeSpan.FromSeconds(60) && !reader.EndOfStream)
{
var line = reader.ReadLine();
var values = line.Split(';');
yield return line;
Count++;
}
}
watch.Stop();
Console.WriteLine($"Stream ended: Total Records:{Count.ToString()} in {watch.Elapsed.TotalMinutes} minutes and {watch.Elapsed.TotalSeconds} seconds.");
}
async IAsyncEnumerable<string> MakeHttpCall()
{
var watch = System.Diagnostics.Stopwatch.StartNew();
int Count = 0;
using (var reader = new StreamReader(@"C:\Users\kosta\source\repos\gRPCDemoUsingNET6\gRPCDemoUsingNET6\Data\sales_records.csv"))
{
while (watch.Elapsed < TimeSpan.FromSeconds(60) && !reader.EndOfStream)
{
var line = reader.ReadLine();
var values = line.Split(';');
yield return line;
Count++;
}
}
watch.Stop();
Console.WriteLine($"Stream ended: Total Records:{Count.ToString()} in {watch.Elapsed.TotalMinutes} minutes and {watch.Elapsed.TotalSeconds} seconds.");
}