# lanwah/easynetwrapper architecture

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

- Interactive diagram: https://gitdiagram.com/lanwah/easynetwrapper
- Repository: https://github.com/lanwah/easynetwrapper

## Overview

##### Project type and purpose
- This is a multi-project, open-source .NET utility/extension library suite (EasyNetWrapper) delivered as a Visual Studio solution.
- Its goal is to provide a set of reusable core services (logging, environment, reflection), shared exception types, collection/string/stream extensions, Win32 API wrappers, security/crypto providers, JSON conversion providers, domain models, and helper executables (runner, installer checker). There are also demo and benchmark apps that reference these libraries.

##### File structure
- Top-level solution (EasyNetWrapper.sln) contains dozens of C# projects under folders like EasyNet.Core, EasyNet.Extensions.Shared, EasyNet.Security.Shared, EasyNet.Win32.Shared, EasyNet.Runner, EasyNet.Ollama, etc.
- “Core” is the foundational library (logging, environment, file updater).
- “Shared” projects group cross-cutting concerns: exceptions, extensions (collections, reflection), Win32 wrappers, WinForm UI controls, security/CRC, JSON convert providers.
- Consumer apps/projects include EasyNet.Runner (CLI executable), EasyNet.InstallChecker (library and console checkers), EasyNet.WinForm (UI app), Demos (WinForms and console), Benchmarks (performance comparers and converters), and Samples (tutorial applications).
- Packaging: NuGet packages exist for EasyNet.Core and external dependencies (log4net, Newtonsoft.Json).
- Build/deployment files: csproj, nuspec, publish profiles.

##### README
- Confirms use of log4net as the logging engine.
- Describes three main projects: Core, Extension (Utils), Win32.
- Change log shows evolution: adding extensions, helpers, Win32 wrappers.

##### Detail
- That WinForm Shared is built on Core + Win32 Shared.
- Runner/InstallChecker as lightweight host processes.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Foundation Layer
    subgraph "Foundation Layer"
        Core["EasyNet.Core"]:::core
    end

    %% Shared Libraries Layer
    subgraph "Shared Libraries"
        Exception["EasyNet.Exception.Shared"]:::shared
        Extensions["EasyNet.Extensions.Shared"]:::shared
        Security["EasyNet.Security.Shared"]:::shared
        Win32["EasyNet.Win32.Shared"]:::shared
        WinFormShared["EasyNet.WinForm.Shared"]:::shared
        Models["EasyNet.Models"]:::shared
    end

    %% Feature Providers Layer
    subgraph "Feature Providers"
        JsonProvider["EasyNet.JsonConvertProvider"]:::provider
        Ollama["EasyNet.Ollama"]:::provider
        InstallChecker["EasyNet.InstallChecker"]:::provider
        Runner["EasyNet.Runner"]:::provider
    end

    %% Applications Layer
    subgraph "Applications"
        WinFormApp["EasyNet.WinForm"]:::app
        DemoWin["EasyNet.Demo"]:::app
        DemoConsole["EasyNet.Tester"]:::app
        BenchComparer["Benchmarks.Comparer"]:::app
        BenchConverter["Benchmarks.Converter"]:::app
        Samples["Samples"]:::app
    end

    %% Dependencies
    Exception -->|depends on| Core
    Extensions -->|depends on| Core
    Security -->|depends on| Core
    Win32 -->|depends on| Core
    Models -->|depends on| Core
    WinFormShared -->|depends on| Core
    WinFormShared -->|depends on| Win32

    JsonProvider -->|depends on| Core
    Ollama -->|depends on| Core
    Ollama -->|uses| JsonProvider
    InstallChecker -->|depends on| Core
    Runner -->|depends on| Core

    WinFormApp -->|uses| Core
    WinFormApp -->|uses| Extensions
    WinFormApp -->|uses| WinFormShared
    WinFormApp -->|uses| Win32
    WinFormApp -->|uses| JsonProvider
    WinFormApp -->|uses| Models

    DemoWin -->|uses| Core
    DemoWin -->|uses| Extensions
    DemoWin -->|uses| WinFormShared
    DemoWin -->|uses| Win32
    DemoWin -->|uses| JsonProvider
    DemoWin -->|uses| Models

    DemoConsole -->|uses| Core
    DemoConsole -->|uses| Extensions
    DemoConsole -->|uses| WinFormShared
    DemoConsole -->|uses| Win32
    DemoConsole -->|uses| JsonProvider
    DemoConsole -->|uses| Models

    BenchComparer -->|uses| Core
    BenchComparer -->|uses| Extensions

    BenchConverter -->|uses| Core
    BenchConverter -->|uses| Extensions

    Samples -->|uses| Core
    Samples -->|uses| Extensions

    %% Click Events
    click Core "https://github.com/lanwah/easynetwrapper/blob/develop/EasyNet.Core/EasyNet.Core.csproj"
    click Exception "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.Exception.Shared/"
    click Extensions "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.Extensions.Shared/"
    click Security "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.Security.Shared/"
    click Win32 "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.Win32.Shared/"
    click WinFormShared "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.WinForm.Shared/"
    click Models "https://github.com/lanwah/easynetwrapper/blob/develop/EasyNet.Models/EasyNet.Models.csproj"
    click JsonProvider "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.JsonConvertProvider/"
    click Ollama "https://github.com/lanwah/easynetwrapper/blob/develop/EasyNet.Ollama/EasyNet.Ollama.csproj"
    click InstallChecker "https://github.com/lanwah/easynetwrapper/tree/develop/EasyNet.InstallChecker/"
    click Runner "https://github.com/lanwah/easynetwrapper/blob/develop/EasyNet.Runner/EasyNet.Runner.csproj"
    click WinFormApp "https://github.com/lanwah/easynetwrapper/blob/develop/EasyNet.WinForm/EasyNet.WinForm.csproj"
    click DemoWin "https://github.com/lanwah/easynetwrapper/blob/develop/Demos/EasyNet.Demo/EasyNet.Demo.csproj"
    click DemoConsole "https://github.com/lanwah/easynetwrapper/blob/develop/Demos/EasyNet.Tester/EasyNet.Tester.csproj"
    click BenchComparer "https://github.com/lanwah/easynetwrapper/blob/develop/Benchmarks/Comparer/Comparer.csproj"
    click BenchConverter "https://github.com/lanwah/easynetwrapper/blob/develop/Benchmarks/Converter/Converter.csproj"
    click Samples "https://github.com/lanwah/easynetwrapper/tree/develop/Samples/"

    %% Styles
    classDef core fill:#ADD8E6,stroke:#333,stroke-width:1px
    classDef shared fill:#90EE90,stroke:#333,stroke-width:1px
    classDef provider fill:#FFA07A,stroke:#333,stroke-width:1px
    classDef app fill:#DDA0DD,stroke:#333,stroke-width:1px
```
