Skip to content

Instantly share code, notes, and snippets.

View ATikadze's full-sized avatar
🏠
Working from home

ATikadze ATikadze

🏠
Working from home
View GitHub Profile
@ATikadze
ATikadze / ConsoleSpinner.cs
Last active June 19, 2022 17:48
C#: Animated loading in Console Application
public class ConsoleSpinner
{
private int _counter;
private bool _spinningEnabled;
public ConsoleSpinner(int spinSpeed)
{
SpinSpeed = spinSpeed;
}
@ATikadze
ATikadze / ExceptionManager.cs
Last active June 19, 2022 18:05
C#: Easily manage exceptions
public class ExceptionManager
{
private readonly List<Exception> _thrownExceptions;
private static ExceptionManager _instance;
private ExceptionManager(int maxExceptions, Action onFinalException, Action<Exception> onExceptionThrown = null)
{
MaxExceptions = maxExceptions;
CurrentExceptions = 0;
OnExceptionThrown = onExceptionThrown;