Csharp Singleton Patterns

Implement singleton pattern for single instance management

LgrappaG 711c2d4 956 B Updated

File contents

Csharp Singleton Patterns

Implement singleton pattern for single instance management

Risk Level

LOW

Core Rules

  • Ensure thread safety
  • make testable
  • Test thoroughly before deploying

Response Pattern

When Using This Skill

  1. Implement singletons safely
  2. Validate the implementation
  3. Test edge cases and error conditions
  4. Ensure performance meets requirements

Usage Contexts

  • Single instances
  • global access

What NOT to Do

  • Thread safety issues
  • testing difficulty
  • Deploy without testing

Key Requirements

  • Understand the use cases before application
  • Follow the documented response pattern
  • Validate results in the target environment
  • Monitor for performance impact

Further Learning

Review related skills and documentation for deeper understanding of related systems and best practices.

LgrappaG/Workflows-Agents/tree/main/skills/csharp-singleton-patterns commit 711c2d4661

Frequently asked questions

npx skillmds@latest add lgrappag/csharp-singleton-patterns