An open API service indexing awesome lists of open source software.

https://github.com/mitevpi/c-sharp-design-patterns

Collection of various Object Oriented design patterns implemented in C#.
https://github.com/mitevpi/c-sharp-design-patterns

c-sharp design-patterns reference tutorial

Last synced: 7 months ago
JSON representation

Collection of various Object Oriented design patterns implemented in C#.

Awesome Lists containing this project

README

          

# C# Design Patterns

Collection of various Object Oriented design patterns implemented in C#.

## Patterns

For a more comprehesive explanation of foundational Gang of Four (GoF) Design Patterns, please reference this [resource from dofactory](https://www.dofactory.com/net/design-patterns).

The current collection of Design Patterns includes the following:

1. [Factory](/factory)
2. [Abstract Factory](/abstract-factory)
3. [Singleton](/singleton)
4. [Decorator](/decorator)
5. [Iterator](/iterator)
6. [Observer](/observer)
7. [Repository](/repository)
8. [Unit of Work](/unit-of-work)

## Creational Patterns

### Factory

Creating an instance of several derived classes.

![Factory Method](/assets/factory-diagram.png)

### Abstract Factory

Creating an instance of several families of classes.

![Abstract Factory Method](/assets/abstract-factory-diagram.png)

### Singleton

A structure enforcing a class of which only a single instance can exist.

![Singleton Method](/assets/singleton-diagram.png)

## Structural Patterns

### Decorator

Adding responsibilities to objects dynamically and layering functionality through "wrapping".

![Decorator Method](/assets/decorator-diagram.png)

## Behavioral Patterns

### Iterator

Sequentially accessing the elements of a collection and making distinction between different protocols based on different collections.

![Decorator Method](/assets/iterator-diagram.png)

### Observer

Watching and notifying change to a number of classes.

![Observer Method](/assets/observer-diagram.png)

### Unit of Work

TBD

![Unit of Work Method](/assets/unit-of-work-diagram.png)