StellaOps.Workflow.Renderer.Svg
Renders laid-out workflow diagrams as SVG and PNG. Install Installing Stella Ops packagesWorkflow downloads and signaturesnet10.01.0.1-20261118T121708Zdotnet add package StellaOps.
Namespaces
| Namespace | Types |
|---|---|
StellaOps. | 4 |
namespace StellaOps.Workflow.Renderer.Svg
| Type | Kind | Description |
|---|---|---|
WorkflowRenderPngExporter | class | Exports SVG workflow diagrams as PNG images. |
WorkflowRenderSvgDocument | record | A rendered SVG workflow diagram and its size. |
WorkflowRenderSvgRenderer | class | Renders positioned workflow diagrams as SVG, with a legend and the licence notice. |
WorkflowRenderSvgServiceCollectionExtensions | class | Registers the SVG renderer of workflow diagrams. |
class WorkflowRenderPngExporter
public sealed class WorkflowRenderPngExporter
Exports SVG workflow diagrams as PNG images.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRenderPngExporter( | constructor | Creates an instance of Workflow. |
ExportAsync( | method | Draws an SVG diagram on a white background and writes it as a PNG file, creating its directory. |
constructor WorkflowRenderPngExporter() #
WorkflowRenderPngExporter() #public WorkflowRenderPngExporter()
Creates an instance of Workflow.
method ExportAsync(WorkflowRenderSvgDocument, string, float, CancellationToken) #
ExportAsync(WorkflowRenderSvgDocument, string, float, CancellationToken) #public Task ExportAsync(WorkflowRenderSvgDocument document, string pngPath, float scale = 2, CancellationToken cancellationToken = default)
Draws an SVG diagram on a white background and writes it as a PNG file, creating its directory.
Parameters
document: The SVG diagram.pngPath: The PNG file to write.scale: The scale of the image against the diagram size; 2 by default.cancellationToken: Cancels the operation.
Returns
A task that completes when the file is written.
Exceptions
Invalid: The SVG cannot be loaded.Operation Exception
record WorkflowRenderSvgDocument
public sealed record WorkflowRenderSvgDocument
A rendered SVG workflow diagram and its size.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRenderSvgDocument( | constructor | Creates an instance of Workflow. |
Height | property | The diagram height, in SVG user units. |
Svg | property | The SVG markup. |
Width | property | The diagram width, in SVG user units. |
constructor WorkflowRenderSvgDocument() #
WorkflowRenderSvgDocument() #public WorkflowRenderSvgDocument()
Creates an instance of Workflow.
property Height #
Height #public required double Height { get; init; }
The diagram height, in SVG user units.
property Svg #
Svg #public required string Svg { get; init; }
The SVG markup.
property Width #
Width #public required double Width { get; init; }
The diagram width, in SVG user units.
class WorkflowRenderSvgRenderer
public sealed class WorkflowRenderSvgRenderer : IWorkflowRenderSvgRenderer
Renders positioned workflow diagrams as SVG, with a legend and the licence notice.
Members
| Member | Kind | Summary |
|---|---|---|
WorkflowRenderSvgRenderer( | constructor | Creates an instance of Workflow. |
NoLicenceRecordNotice | constant | The licence notice for a renderer host that loads no licence file, such as a build-time export: the component licence notice when no licence record is loaded. |
Render( | method | Renders layout as an SVG document titled title. |
RenderSvg( | method | Renders layout titled title. |
constructor WorkflowRenderSvgRenderer() #
WorkflowRenderSvgRenderer() #public WorkflowRenderSvgRenderer()
Creates an instance of Workflow.
constant NoLicenceRecordNotice #
NoLicenceRecordNotice #public const string NoLicenceRecordNotice = "No local licence record is loaded. See the applicable LICENSE and Order for permitted use."
The licence notice for a renderer host that loads no licence file, such as a build-time export: the component licence notice when no licence record is loaded. A host that runs the engine passes the notice of its latest licence evaluation instead (Workflow).
method Render(WorkflowRenderLayoutResult, string, string) #
Render(WorkflowRenderLayoutResult, string, string) #public WorkflowRenderSvgDocument Render(WorkflowRenderLayoutResult layout, string title, string licenceNotice)
Renders layout as an SVG document titled title. Every diagram carries licenceNotice as visible text along its bottom edge (data-licence-notice), XML-escaped.
method RenderSvg(WorkflowRenderLayoutResult, string, string) #
RenderSvg(WorkflowRenderLayoutResult, string, string) #public string RenderSvg(WorkflowRenderLayoutResult layout, string title, string? licenceNotice)
Renders layout titled title. Every diagram carries a licence notice: licenceNotice when the host has one, otherwise the renderer’s notice for a host without a loaded licence record.
class WorkflowRenderSvgServiceCollectionExtensions
public static class WorkflowRenderSvgServiceCollectionExtensions
Registers the SVG renderer of workflow diagrams.
Members
| Member | Kind | Summary |
|---|---|---|
AddWorkflowSvgRenderer( | extension method | Registers WorkflowRenderSvgRendereras the host’s IWorkflowRenderSvgRenderer, which turns on the server-side SVG of the definition render graph (IncludeSvg). |
extension method AddWorkflowSvgRenderer(IServiceCollection) #
AddWorkflowSvgRenderer(IServiceCollection) #public static IServiceCollection AddWorkflowSvgRenderer(this IServiceCollection services)
Registers WorkflowRenderSvgRendereras the host’s IWorkflowRenderSvgRenderer, which turns on the server-side SVG of the definition render graph (IncludeSvg).