https://github.com/datajuggler/docgen
DocGen reads a Visual Studio Solution and will stores the data in SQL and create a documentation database.
https://github.com/datajuggler/docgen
Last synced: about 1 year ago
JSON representation
DocGen reads a Visual Studio Solution and will stores the data in SQL and create a documentation database.
- Host: GitHub
- URL: https://github.com/datajuggler/docgen
- Owner: DataJuggler
- License: mit
- Created: 2024-10-12T15:08:21.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-11-23T18:16:38.000Z (over 1 year ago)
- Last Synced: 2025-01-31T11:16:01.437Z (over 1 year ago)
- Language: C#
- Homepage:
- Size: 1.43 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: ReadMe.md
- License: LICENSE.txt
Awesome Lists containing this project
README
DataJuggler.DocGen analyzes and Saves the code objects found in a Visual Studio solution in SQL Server.
The main purpose of this project is to create documentation, but there are other uses.
Code For The NuGet package and this project
https://github.com/DataJuggler/DocGen
The GitHub repo is here and has a Sample Windows Forms application. For now all it does
is analyze a solution and save all the details in SQL Server. Coming soon is a Blazor admin portal
to allow a solution owner to manage the documentation including editing, hiding, showing and
creating code samples or images.
# Descriptions
For now, the descriptions for projects are read from the .csproject files.
All other descriptions are read from Summary Text if present.
///
/// This class is the code behind for the CalendarComponent
///
public partial class CalendarComponent : IBlazorComponent, IBlazorComponentParent
In the above example, the description would be parsed to
This class is the code behind for the CalendarComponent.
I am investigating if there is a free or very cheap way to have AI write descriptions if a description is not present.
Here is the code to analyze an entire solution
// Create a new instance of an 'UICallback' object.
UICallback uICallback = new UICallback(UpdateBatchProgress, UpdateOverallProgress);
// Retrieve the Solution
Solution = await DocGenerator.AnalyzeSolution(SolutionSelector.Text, uICallback);
UICallback is a class that contains two delegates:
The MainForm has two status labels and two progress bars. Overall Progress is for Projects and
the Batch Progress is for the Code Files of that project.
#region UpdateBatchProgress(int max, int currentValue, string status)
///
/// Update Batch Progress
///
public void UpdateBatchProgress(int max, int currentValue, string status)
{
// Set the Text
BatchStatusLabel.Text = status;
// Setup the Progressbar
BatchGraph.Maximum = max;
BatchGraph.Value = currentValue;
// Force an update
Refresh();
Application.DoEvents();
}
#endregion
#region UpdateOverallProgress(int max, int currentValue, string status)
///
/// Update Overall Progress
///
public void UpdateOverallProgress(int max, int currentValue, string status)
{
// Set the Text
OverallStatusLabel.Text = status;
// Setup the Progressbar
OverallGraph.Maximum = max;
OverallGraph.Value = currentValue;
// Force an update
Refresh();
Application.DoEvents();
}
#endregion
# Saving Results In SQL Server
To save a solution after Analyzing, create a System Environment Variable named DocGenConn, containing
a connection string to SQL Server. Create a database named DocGen and create a connection string.
# Example Connection Strings
Replace out ServerName. You must have Encrypt=False in the connection string.
SQL Server
Data Source=ServerName;Initial Catalog=DocGen;Integrated Security=True;Encrypt=False;
SQL Express
Data Source=ServerName\SQLExpress;Initial Catalog=DocGen;Integrated Security=True;Encrypt=False;
# Future Updates
The next feature I will add is the ability to get a list of projects from the solution, in case you only want to generate
docs for certain projects. Then as I get time start working on a Blazor portal to generate and host documentation.