Skip to content

Instantly share code, notes, and snippets.

@lgolubyev
Last active August 8, 2022 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lgolubyev/0e523481fdb71966e809ff0e0ff7c068 to your computer and use it in GitHub Desktop.
Save lgolubyev/0e523481fdb71966e809ff0e0ff7c068 to your computer and use it in GitHub Desktop.
using System;
using System.IO;
namespace CsharpSingleResponsibilityPrinciple
{
class Wrapper
{
public void HandleAdd(FileLogger logger, Database db, User user)
{
try
{
user.Add(db);
}
catch (Exception error)
{
logger.Handle(error.ToString());
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment