class Program
{
static int Main(string[] args)
{
return new AppRunner<Program>().Run(args);
}
public void Range( int start, int count, int sleep = 0)
{
foreach (var i in Enumerable.Range(start, count))
{
Console.WriteLine(i);
if (sleep > 0)
{
Thread.Sleep(sleep);
}
}
}
public void Sum(IEnumerable<int> values)
{
int total = 0;
foreach (var value in values)
{
Console.WriteLine(total += value);
}
}
}
and my command
./BufferInspacter.exe Range 10 100 1 | ./BufferInspacter.exe Sum
and error output
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
at BufferInspacter.Program.Sum(IEnumerable`1 values) in C:\Users\admin\source\repos\jpgls\BufferInspacter\Program.cs:line 41
--- End of stack trace from previous location ---
at CommandDotNet.AppRunner.HandleException(Exception ex, IConsole console, CommandContext commandContext) in CommandDotNet/AppRunner.cs:line 158
at CommandDotNet.AppRunner.Run(String[] args) in CommandDotNet/AppRunner.cs:line 83
at BufferInspacter.Program.Main(String[] args) in C:\Users\admin\source\repos\jpgls\BufferInspacter\Program.cs:line 25
this is my code
and my command
and error output