Skip to content

NikoNenov/DesignPatterns

Repository files navigation

Design Patterns (.NET C#)

Design Patterns

Creational Patterns

  • Singleton - A class of which only a single instance can exist
    • Singleton (not thread safe)
    • Singleton (thread safe - .NET 4 Lazy T type)

Factory Method

  • Creates an instance of several derived classes

Structural Patterns

Adapter

  • Adapter is a structural design pattern, which allows incompatible objects to collaborate.

Decorator

  • Add responsibilities to objects dynamically.

Behavioral Patterns

Template Method

  • Defines the skeleton of an algorithm in the superclass but lets subclasses override specific steps of the algorithm without changing its structure.

State

  • Allow an object to alter its behavior when its internal state changes. The object will appear to change its class.

Informations

Infos Links
Design patterns Refactoring.guru
.NET Design Patterns dofactory.com
C# in Depth Articles