Cast.Core
1.3.21
dotnet add package Cast.Core --version 1.3.21
NuGet\Install-Package Cast.Core -Version 1.3.21
<PackageReference Include="Cast.Core" Version="1.3.21" />
<PackageVersion Include="Cast.Core" Version="1.3.21" />
<PackageReference Include="Cast.Core" />
paket add Cast.Core --version 1.3.21
#r "nuget: Cast.Core, 1.3.21"
#:package Cast.Core@1.3.21
#addin nuget:?package=Cast.Core&version=1.3.21
#tool nuget:?package=Cast.Core&version=1.3.21
Cast.Core
Cast.Core is the reusable .NET engine behind the Cast command-line tool. It provides dependency-free APIs for building and validating sequence diagrams, inspecting Angular and TypeScript source, rendering PlantUML, and applying Cast's sequence-diagram style.
The package targets .NET 8 and later. It does not depend on System.CommandLine, dependency injection, logging, filesystem adapters, or platform-specific editor integration.
Install
dotnet add package Cast.Core --version 1.0.0
Build and render a diagram
using Cast.Core.Models;
using Cast.Core.Services;
var kinds = new ParticipantKindCatalog();
var participants = new ParticipantParser(kinds);
var messages = new MessageParser();
var validator = new DiagramSpecValidator(participants, messages);
IReadOnlyList<Participant> parsedParticipants = validator.ParseParticipants(
["actor:User", "control:Api:Ordering API"]);
IReadOnlyList<Message> parsedMessages = validator.ParseMessages(
["User -> Api : place order"],
parsedParticipants);
var diagram = new SequenceDiagram(
parsedParticipants,
parsedMessages,
Title: "Place an order");
var renderer = new PlantUmlSequenceRenderer(kinds);
string plantUml = renderer.Render(diagram);
Invalid participant, message, metadata, or source input throws Cast.Core.Diagnostics.DiagramFormatException with a caller-safe message.
Inspect source code
Parse an Angular dependency graph directly from TypeScript source:
using Cast.Core.Services;
var parser = new AngularServiceParser();
var renderer = new PlantUmlAngularDiagramRenderer();
var service = parser.Parse(typeScriptSource, "orders.service.ts");
string plantUml = renderer.Render(service);
For outbound TypeScript calls, use TypeScriptCallGraphParser with PlantUmlCallGraphRenderer. For existing PlantUML text, use SequenceDiagramDetector and PlantUmlSequenceStyler.
Cast.Core works entirely with strings and domain models. Reading source files, writing diagrams, logging, and dependency-injection registration remain responsibilities of the consuming application.
Build the package
From the repository root:
dotnet pack src/Cast.Core/Cast.Core.csproj --configuration Release
Publishing the resulting .nupkg is intentionally separate from the automatic Cast.Cli release workflow.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.3.21 | 122 | 7/31/2026 |