Table of Contents

Class Documentation

Namespace
C4.Net.Documentation
Assembly
C4.Net.Core.dll

Represents the documentation within a workspace - a collection of content in Markdown or AsciiDoc format, optionally with attached images.

See https://structurizr.com/help/documentation on the Structurizr website for more details.

[DataContract]
public sealed class Documentation
Inheritance
Documentation
Inherited Members

Constructors

Documentation(Model)

Creates documentation bound to a specific model.

public Documentation(Model model)

Parameters

model Model

The model that owns any documented elements.

Exceptions

ArgumentException

Thrown when model is null.

Properties

Decisions

Stores the architecture decisions attached to the workspace and its elements.

[DataMember(Name = "decisions", EmitDefaultValue = false)]
public ISet<Decision> Decisions { get; }

Property Value

ISet<Decision>

Images

Stores images that can be referenced from documentation content.

[DataMember(Name = "images", EmitDefaultValue = false)]
public ISet<Image> Images { get; }

Property Value

ISet<Image>

Model

Points to the model that documentation sections and decisions reference.

public Model Model { get; set; }

Property Value

Model

Sections

Stores the ordered documentation sections attached to the workspace and its elements.

[DataMember(Name = "sections", EmitDefaultValue = false)]
public ISet<Section> Sections { get; }

Property Value

ISet<Section>

Methods

AddDecision(SoftwareSystem, string, DateTime, string, DecisionStatus, Format, string)

Adds an architecture decision scoped to a software system.

public Decision AddDecision(SoftwareSystem softwareSystem, string id, DateTime date, string title, DecisionStatus status, Format format, string content)

Parameters

softwareSystem SoftwareSystem

The software system that owns the decision.

id string

The unique decision identifier within the software system.

date DateTime

The date associated with the decision.

title string

The decision title.

status DecisionStatus

The decision status.

format Format

The format of content.

content string

The decision body.

Returns

Decision

The decision that was added.

Exceptions

ArgumentException

Thrown when required values are missing or when the identifier already exists for the software system.

AddDecision(string, DateTime, string, DecisionStatus, Format, string)

Adds a workspace-level architecture decision.

public Decision AddDecision(string id, DateTime date, string title, DecisionStatus status, Format format, string content)

Parameters

id string

The unique decision identifier.

date DateTime

The date associated with the decision.

title string

The decision title.

status DecisionStatus

The decision status.

format Format

The format of content.

content string

The decision body.

Returns

Decision

The decision that was added.

Exceptions

ArgumentException

Thrown when required values are missing or when the identifier already exists at workspace scope.

Hydrate()

Resolves stored element identifiers back to model element references.

public void Hydrate()

IsEmpty()

Indicates whether the documentation has any sections or images.

public bool IsEmpty()

Returns

bool

true when no sections and no images are present; otherwise, false.