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

https://github.com/limon-s-interview-prep-zone/design-pattern

🎨 Welcome to the Common Design Patterns repository! This project provides practical implementations of well-known design patterns in C#, ASP.NET Core, and Python.
https://github.com/limon-s-interview-prep-zone/design-pattern

csharp design-patterns python

Last synced: 5 months ago
JSON representation

🎨 Welcome to the Common Design Patterns repository! This project provides practical implementations of well-known design patterns in C#, ASP.NET Core, and Python.

Awesome Lists containing this project

README

          

# Design Patterns in C# and .NET Core
[![Repo License](https://img.shields.io/github/license/Limon-s-Interview-Prep-Zone/Design-Pattern)](LICENSE) | [![GitHub stars](https://img.shields.io/github/stars/Limon-s-Interview-Prep-Zone/Design-Pattern)](https://github.com/Limon-s-Interview-Prep-Zone/Design-Pattern/stargazers) | [![GitHub forks](https://img.shields.io/github/forks/Limon-s-Interview-Prep-Zone/Design-Pattern)](https://github.com/Limon-s-Interview-Prep-Zone/Design-Pattern/network/members)

This repository contains implementations and examples of **design patterns** using **C#**. The goal is to provide an easy-to-understand reference for software developers to learn and apply design patterns in real-world scenarios.

---

## Table of Contents
- [Design Patterns in C# and .NET Core](#design-patterns-in-c-and-net-core)
- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Design Patterns Implemented](#design-patterns-implemented)
- [1. Creational Patterns](#1-creational-patterns)
- [2. Structural Patterns](#2-structural-patterns)
- [3. Behavioral Patterns](#3-behavioral-patterns)
- [How to Use](#how-to-use)
- [Contribution Guidelines](#contribution-guidelines)

---

## Introduction
Design patterns are reusable solutions to common software design problems. This repository showcases practical implementations of various **creational**, **structural**, and **behavioral** patterns, aiming to serve as a study guide and reference for developers.

---

## Design Patterns Implemented
### 1. Creational Patterns
- **Singleton**: Ensures a class has only one instance.
- **Factory Method**: Creates objects without specifying the exact class.
- **Builder**: Constructs complex objects step by step.
- **Abstract Factory**: Creates families of related objects.

### 2. Structural Patterns
- **Adapter**: Converts an interface into another interface expected by the client.
- **Decorator**: Adds new functionality dynamically to objects.
- **Composite**: Composes objects into tree structures.
- **Proxy**: Provides a surrogate for another object.
- **Bridge**: Decouples an abstraction from its implementation.

### 3. Behavioral Patterns
- **Observer**: Allows objects to notify others about changes.
- **Strategy**: Encapsulates algorithms and makes them interchangeable.
- **Command**: Encapsulates a request as an object.

---

## How to Use
1. **Clone the repository**:
```bash
git clone https://github.com/Limon-s-Interview-Prep-Zone/Design-Pattern.git
cd Design-Pattern
```

2. **Navigate to a specific pattern directory:**
```bash
cd CreationalPatterns/Singleton
```

3. ****
```bash
dotnet build
dotnet run
```

## Contribution Guidelines
We welcome contributions!
1. Fork the repository.
2. Create a feature branch:
```bash
git checkout -b feature/[lang]-new-pattern
```
3. Commit your changes:
```bash
git commit -m "Feat: add new pattern in [lang]"
```