Add Design Patterns

This commit is contained in:
2026-01-20 10:30:21 +01:00
parent 4a83bd3d5a
commit b9e8eb590c
24 changed files with 298 additions and 3 deletions

13
ProxyLib/SubjectProxy.cs Normal file
View File

@@ -0,0 +1,13 @@
namespace ProxyLib;
public class SubjectProxy : ISubject
{
public bool CanLog { get; set; }
private readonly ISubject _subject = new ConcreteSubject();
public void Log()
{
if (!CanLog) return;
_subject.Log();
}
}