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
modelModelThe model that owns any documented elements.
Exceptions
- ArgumentException
Thrown when
modelisnull.
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
Images
Stores images that can be referenced from documentation content.
[DataMember(Name = "images", EmitDefaultValue = false)]
public ISet<Image> Images { get; }
Property Value
Model
Points to the model that documentation sections and decisions reference.
public Model Model { get; set; }
Property Value
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
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
softwareSystemSoftwareSystemThe software system that owns the decision.
idstringThe unique decision identifier within the software system.
dateDateTimeThe date associated with the decision.
titlestringThe decision title.
statusDecisionStatusThe decision status.
formatFormatThe format of
content.contentstringThe 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
idstringThe unique decision identifier.
dateDateTimeThe date associated with the decision.
titlestringThe decision title.
statusDecisionStatusThe decision status.
formatFormatThe format of
content.contentstringThe 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
truewhen no sections and no images are present; otherwise,false.