Cast.Core 1.3.21

dotnet add package Cast.Core --version 1.3.21
                    
NuGet\Install-Package Cast.Core -Version 1.3.21
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cast.Core" Version="1.3.21" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cast.Core" Version="1.3.21" />
                    
Directory.Packages.props
<PackageReference Include="Cast.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cast.Core --version 1.3.21
                    
#r "nuget: Cast.Core, 1.3.21"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Cast.Core@1.3.21
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Cast.Core&version=1.3.21
                    
Install as a Cake Addin
#tool nuget:?package=Cast.Core&version=1.3.21
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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