RSCG – RSCG_ExportDiagram
| name | RSCG_ExportDiagram |
| nuget | https://github.com/ignatandrei/RSCG_ExportDiagram |
| link | RSCG_ExportDiagram |
| author | AndreiIgnat |
Generating diagram for relation classes within referenced project
This is how you can use RSCG_ExportDiagram .
The code that you start with is
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="RSCG_ExportDiagram" Version="2024.810.832" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<ItemGroup>
<CompilerVisibleProperty Include="RSCG_ExportDiagram_OutputFolder" />
<CompilerVisibleProperty Include="RSCG_ExportDiagram_Exclude" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Person\Person.csproj" />
</ItemGroup>
<PropertyGroup>
<RSCG_ExportDiagram_OutputFolder>obj/GX/</RSCG_ExportDiagram_OutputFolder>
<RSCG_ExportDiagram_Exclude></RSCG_ExportDiagram_Exclude>
</PropertyGroup>
<PropertyGroup>
<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>$(BaseIntermediateOutputPath)\GX</CompilerGeneratedFilesOutputPath>
</PropertyGroup>
</Project>
The code that you will use is
using Person;
internal class Program
{
private static void Main(string[] args)
{
PersonData person = new ();
person.Name = "Andrei Ignat";
Console.WriteLine(person.Name);
}
}
namespace Person;
public class PersonData
{
public string Name { get; set; }
public int Age { get; set; }
}
The code that is generated is
//JSONFolder=obj/GX/
//projectDir=D:\gth\RSCG_Examples\v2\rscg_examples\RSCG_ExportDiagram\src\DiagramDemo\DiagramDemoConsole\
//projectName=DiagramDemoConsole
//excludeData=
file class Program_References_1
{
public Program_References_1()
{
// Method Main has following external references
// Person.PersonData..ctor
//Person.PersonData.Name
}
}
Code and pdf at
https://ignatandrei.github.io/RSCG_Examples/v2/docs/RSCG_ExportDiagram
Leave a Reply