Rename 'Demo' example to 'Showcase'

This commit is contained in:
Patrik Svensson
2021-04-09 13:59:48 +02:00
committed by Patrik Svensson
parent efa3d3b130
commit 6a5c507936
5 changed files with 18 additions and 42 deletions

View File

@ -0,0 +1,31 @@
using System;
using Spectre.Console;
namespace Showcase
{
public static class ExceptionGenerator
{
public static Exception GenerateException()
{
try
{
SomeOperation();
throw new InvalidOperationException();
}
catch (Exception ex)
{
return ex;
}
}
private static void SomeOperation()
{
SomeOperationGoingWrong();
}
private static void SomeOperationGoingWrong()
{
throw new InvalidOperationException("Something went very wrong!");
}
}
}