File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ Design Patterns Examples
2+
3+ This solution demonstrates simple design pattern examples in C# targeting .NET 10 (C# 14).
4+
5+ Projects
6+ - ` DesignPatterns ` - Console demo showing Factory and Singleton patterns.
7+ - Factory implementation: ` DesignPatterns/Factories `
8+ - Singleton implementation: ` DesignPatterns/Singleton/Logger.cs `
9+ - ` Tests ` - xUnit tests covering the factory and singleton examples.
10+
11+ Requirements
12+ - .NET 10 SDK
13+
14+ Common commands
15+ - Build solution: ` dotnet build `
16+ - Run console demo: ` dotnet run --project DesignPatterns `
17+ - Run tests: ` dotnet test `
18+
19+ Notes
20+ - The ` Logger ` singleton is thread-safe and uses ` System.Lazy<T> ` with a ` ConcurrentQueue<string> ` to store messages.
21+ - Tests are located in the ` Tests ` project; see ` Tests/ShapeFactoryTests.cs ` and ` Tests/SingletonTests.cs ` .
You can’t perform that action at this time.
0 commit comments