How pradhan-v/plugster works
Project type and purpose
• Desktop application (Windows Forms / WPF style)
• Purpose: an editor and execution host for C# plugins (and simple C# programs)
• Provides both GUI (PlugsterUI) and CLI (PlugsterConsole) front-ends
File structure
Top-level assemblies/projects:
• FlatForm
– Custom WinForms controls and theming (MadPiranha/FlatForm/Controls and UITheme)
• ManyUtils
– Utility library (syntax highlighter, hotkey handling, process/window actions, etc.)
• PlugsterBase
– Core engine: plugin loader, test runner, parameter definitions, output interfaces
• PlugsterConsole
– Command-line front-end invoking PlugsterBase, using console I/O (ConsoleOutput)
• PlugsterUI
– GUI front-end: hosts editor (CodeTextBox), QuickTest panel, parameter editors, output window
• PlugsterTests
– Unit/integration tests exercising the core engine
README for insights
• Confirms C# desktop app to edit & execute plugins
• Mentions self-hosting (the app can load its own plugins)
Diagramming the architecture
a. Main components
• UI Layer
– PlugsterUI.exe with WinForms controls (from FlatForm + ManyUtils)
• CLI Layer
– PlugsterConsole.exe
• Core Engine
– PlugsterBase.dll
· Loader (PlugLoader, IPlugLoadInfo, TestLoadInfo)
· Manager (Sponsor/Sponsorer)
· Param model (IParam, BoolParam, TextParam, …)
· QuickTest runner, TestController, lifecycle events
· Output interface (IOutput, ConsoleOutput)
• Utilities
– ManyUtils.dll (Highlighter, HotKeyRegister, WindowAction, etc.)
• Tests
– PlugsterTests.dll targeting core engine
b. Relationships & data flows
1. User interacts with PlugsterUI
→ UI invokes Core Engine APIs (load plugin, run tests, update parameters)
→ Core Engine returns status/events → UI displays via OutputWindow controls
2. User runs CLI (PlugsterConsole)
→ CLI calls same Core Engine APIs → uses ConsoleOutput to print results
3. Both front-ends rely on support libraries:
– FlatForm for custom controls
– ManyUtils for highlighting, hotkeys, window/process actions
4. Test harness (PlugsterTests)
→ Directly references Core Engine classes to assert functionality
c. Architectural patterns & principles
• Layered architecture
– Presentation (UI/CLI)
– Application core (PlugsterBase)
– Utilities (FlatForm, ManyUtils)
– Tests (separate layer)
• Dependency Injection via interfaces (IOutput, IParamControlFactory)
• Plugin architecture via reflection and loader abstractions
• Separation of concerns: UI logic vs. engine vs. utilities
d. Key technologies/frameworks
• C#/.NET Framework (WinForms)
• Visual Studio solutions/projects (.csproj, app.config)
• Reflection & dynamic compilation (QuickTest, plugin loader)