.NET Design Pattern Review

.NET Design Pattern Review

Reviews C#/.NET code for how well it follows required design patterns, architecture conventions and SOLID principles, and suggests improvements without changing code.

Skill files1 file
SKILL.md43 lines
1
---
2
name: dotnet-design-pattern-review
3
description: 'Review the C#/.NET code for design pattern implementation and suggest improvements.'
4
---
5
6
# .NET/C# Design Pattern Review
7
8
Review the C#/.NET code in ${selection} for design pattern implementation and suggest improvements for the solution/project. Do not make any changes to the code, just provide a review.
9
10
## Required Design Patterns
11
12
- **Command Pattern**: Generic base classes (`CommandHandler<TOptions>`), `ICommandHandler<TOptions>` interface, `CommandHandlerOptions` inheritance, static `SetupCommand(IHost host)` methods
13
- **Factory Pattern**: Complex object creation service provider integration
14
- **Dependency Injection**: Primary constructor syntax, `ArgumentNullException` null checks, interface abstractions, proper service lifetimes
15
- **Repository Pattern**: Async data access interfaces provider abstractions for connections
16
- **Provider Pattern**: External service abstractions (database, AI), clear contracts, configuration handling
17
- **Resource Pattern**: ResourceManager for localized messages, separate .resx files (LogMessages, ErrorMessages)
18
19
## Review Checklist
20
21
- **Design Patterns**: Identify patterns used. Are Command Handler, Factory, Provider, and Repository patterns correctly implemented? Missing beneficial patterns?
22
- **Architecture**: Follow namespace conventions (`{Core|Console|App|Service}.{Feature}`)? Proper separation between Core/Console projects? Modular and readable?
23
- **.NET Best Practices**: Primary constructors, async/await with Task returns, ResourceManager usage, structured logging, strongly-typed configuration?
24
- **GoF Patterns**: Command, Factory, Template Method, Strategy patterns correctly implemented?
25
- **SOLID Principles**: Single Responsibility, Open/Closed, Liskov Substitution, Interface Segregation, Dependency Inversion violations?
26
- **Performance**: Proper async/await, resource disposal, ConfigureAwait(false), parallel processing opportunities?
27
- **Maintainability**: Clear separation of concerns, consistent error handling, proper configuration usage?
28
- **Testability**: Dependencies abstracted via interfaces, mockable components, async testability, AAA pattern compatibility?
29
- **Security**: Input validation, secure credential handling, parameterized queries, safe exception handling?
30
- **Documentation**: XML docs for public APIs, parameter/return descriptions, resource file organization?
31
- **Code Clarity**: Meaningful names reflecting domain concepts, clear intent through patterns, self-explanatory structure?
32
- **Clean Code**: Consistent style, appropriate method/class size, minimal complexity, eliminated duplication?
33
34
## Improvement Focus Areas
35
36
- **Command Handlers**: Validation in base class, consistent error handling, proper resource management
37
- **Factories**: Dependency configuration, service provider integration, disposal patterns
38
- **Providers**: Connection management, async patterns, exception handling and logging
39
- **Configuration**: Data annotations, validation attributes, secure sensitive value handling
40
- **AI/ML Integration**: Semantic Kernel patterns, structured output handling, model configuration
41
42
Provide specific, actionable recommendations for improvements aligned with the project's architecture and .NET best practices.
43

© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 13,704 prompts

More by @OpenSourceBuffGuy

See all
Seated woman over giant graphite watercolor face prompt image

Seated woman over giant graphite watercolor face

Paints an elegant watercolor fashion portrait of a seated woman in lavender and ivory in front of a giant graphite-and-watercolor close-up of her own face.

image-prompt, gpt-image, watercolor, portrait, woman, fashion, fashion-shoot, editorial, double-exposure, black-and-white, muted-colors, soft-lighting, full-body, vertical-format, negative-prompt, illustration, sketch, negative-space, fine-art, character-design, structured-output, for-artists, jewelry, long-form

Woman with hot cup at Christmas market prompt image

Woman with hot cup at Christmas market

Creates a candid smartphone-style photo of a woman in a white fur coat holding a hot drink at an evening Christmas market, keeping the face from a reference photo.

image-prompt, gpt-image, nano-banana, face-reference, reference-image, negative-prompt, photorealistic, portrait, woman, christmas, holiday, winter, night-scene, candid, smartphone-photo, medium-shot, fashion, street-photography, cozy, warm-colors, structured-output, for-photographers, long-form, guardrails, cityscape

Suited man enters glowing elevator, floor display at 13 prompt image

Suited man enters glowing elevator, floor display at 13

Writes a 30-second Korean mystery thriller in which a man's elevator opens onto an impossible floor 0, with scene beats, cinematography and sound design.

video-prompt, seedance, horror, thriller, short-film, cinematic, multi-shot, timed-beats, character-consistency, camera-movement, sound-effects, guardrails, structured-output, photorealistic, korea, night-scene, symmetry, moody, for-filmmakers, long-form, advanced, film-noir

Reviews

Loading reviews…

Discussion

Loading comments…