Skip to content

Commit 2867969

Browse files
committed
add README.md
1 parent 251cc00 commit 2867969

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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`.

0 commit comments

Comments
 (0)