# ysgstudyhards/dotnetguide architecture

> Architecture diagram of the GitHub repository ysgstudyhards/dotnetguide, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ysgstudyhards/dotnetguide
- Repository: https://github.com/ysgstudyhards/dotnetguide

## Overview

##### Project Type & Purpose
- This is primarily an open-source learning repository (“DotNetGuide”) that combines:
- A static knowledge-base of Markdown-based guides (docs/ + assets/) for C#/.NET learners.
- A .NET console application (HelloDotNetGuide) that hosts C# exercises (syntax, algorithms, patterns, async).
- Purpose: provide structured learning materials and runnable sample code in one GitHub repo.

##### High-Level Component Identification
- Repository (GitHub)
- Static Content Module
– docs/ (Markdown learning guides, grouped by topic)
– assets/ (images, logos, roadmaps)
- Code Module
– DotNetGuidePractice.sln
– HelloDotNetGuide console project
· CSharp语法/ (syntax exercises)
· 常见算法/ (algorithm implementations)
· 异步多线程编程/ (async & multithreading examples)
· 数组相关/ (array exercises)
· 正则表达式/ (regex demos)
· 设计模式/ (pattern samples)
- Developer Environment
– .NET SDK & CLI or Visual Studio
– Local machine
- Runtime
– .NET runtime executes HelloDotNetGuide.exe on user’s PC

##### Relationships & Data Flows
- Developer “git clone” → Repository
- Developer launches VS or `dotnet run`
→ builds solution
→ compiles HelloDotNetGuide project
→ executes exercise code (console output)
- Docs are rendered locally with a Markdown viewer or published via GitHub Pages
- Assets are referenced by docs (images) and by README

##### Architectural Patterns & Design Principles
- Modular folder structure: each exercise domain is a separate namespace/ folder (encourages separation of concerns)
- Single‐project console application: no external service dependencies
- Static content separation vs. executable code separation
- Open-source extensibility: new exercise folders can be added and auto-discovered in the project file

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Developer and Environment
    GitHubRepo["GitHub Repository"]:::dev
    DeveloperIDE["Developer IDE/CLI"]:::dev
    DotNetSDK[".NET SDK & Runtime"]:::dev

    %% Static Content Module
    subgraph "Static Content Module"
        direction TB
        Docs["docs/"]:::static
        Assets["assets/"]:::static
    end

    %% Markdown Viewer / GitHub Pages
    MarkdownViewer["Markdown Viewer\n/ GitHub Pages"]:::static

    %% Code Module
    subgraph "Code Module" 
        direction TB
        Solution["DotNetGuidePractice.sln"]:::code
        subgraph "HelloDotNetGuide Project"
            direction TB
            ProjectFile["HelloDotNetGuide.csproj"]:::code
            Program["Program.cs"]:::code
            subgraph "C# Syntax Exercises"
                direction TB
                Syntax1["CSharp12GrammarExercise.cs"]:::code
                Syntax2["LinqExercise.cs"]:::code
                Syntax3["YieldExercise.cs"]:::code
            end
            subgraph "Common Algorithms"
                direction TB
                Algo1["冒泡排序算法.cs"]:::code
                Algo2["二分查找算法.cs"]:::code
                Algo3["归并排序算法.cs"]:::code
            end
            subgraph "Async & Multithreading"
                direction TB
                Async1["AsyncProgrammingExample.cs"]:::code
                Async2["MultithreadingExample.cs"]:::code
                Async3["ReadFileAsyncExample.cs"]:::code
            end
            subgraph "Array Exercises"
                direction TB
                ArrayEx["ArrayDeduplication.cs"]:::code
            end
            subgraph "Regular Expressions"
                direction TB
                RegexEx["RegularExpressions.cs"]:::code
            end
            subgraph "Design Patterns"
                direction TB
                PatternEx["单例模式.cs"]:::code
            end
        end
    end

    %% Flows
    GitHubRepo -->|clone| DeveloperIDE
    DeveloperIDE -->|build| DotNetSDK
    DotNetSDK -->|compile| Solution
    Solution -->|loads project| ProjectFile
    DotNetSDK -->|runs| Program
    Program -->|"executes exercises"| Syntax1
    Program --> Syntax2
    Program --> Syntax3
    Program --> Algo1
    Program --> Algo2
    Program --> Algo3
    Program --> Async1
    Program --> Async2
    Program --> Async3
    Program --> ArrayEx
    Program --> RegexEx
    Program --> PatternEx

    Docs -->|render| MarkdownViewer
    Assets -->|provide assets| MarkdownViewer

    %% Click Events
    click GitHubRepo "https://github.com/ysgstudyhards/dotnetguide/tree/main//"
    click Docs "https://github.com/ysgstudyhards/dotnetguide/tree/main//docs/"
    click Assets "https://github.com/ysgstudyhards/dotnetguide/tree/main//assets/"
    click Solution "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/DotNetGuidePractice.sln"
    click ProjectFile "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/HelloDotNetGuide.csproj"
    click Program "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/Program.cs"
    click Syntax1 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/CSharp语法/CSharp12GrammarExercise.cs"
    click Syntax2 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/CSharp语法/LinqExercise.cs"
    click Syntax3 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/CSharp语法/YieldExercise.cs"
    click Algo1 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/常见算法/冒泡排序算法.cs"
    click Algo2 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/常见算法/二分查找算法.cs"
    click Algo3 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/常见算法/归并排序算法.cs"
    click Async1 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/异步多线程编程/AsyncProgrammingExample.cs"
    click Async2 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/异步多线程编程/MultithreadingExample.cs"
    click Async3 "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/异步多线程编程/ReadFileAsyncExample.cs"
    click ArrayEx "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/数组相关/ArrayDeduplication.cs"
    click RegexEx "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/正则表达式/RegularExpressions.cs"
    click PatternEx "https://github.com/ysgstudyhards/dotnetguide/blob/main//DotNetGuidePractice/HelloDotNetGuide/设计模式/单例模式.cs"

    %% Styles
    classDef code fill:#ADD8E6,stroke:#000,stroke-width:1px
    classDef static fill:#90EE90,stroke:#000,stroke-width:1px
    classDef dev fill:#D3D3D3,stroke:#000,stroke-width:1px
```
