Table of Contents

Class ViewSet

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

The set of views onto a software architecture model.

[DataContract]
public sealed class ViewSet
Inheritance
ViewSet
Inherited Members

Properties

ComponentViews

The set of component views.

[DataMember(Name = "componentViews", EmitDefaultValue = false)]
public ISet<ComponentView> ComponentViews { get; }

Property Value

ISet<ComponentView>

Configuration

The configuration object associated with this set of views.

[DataMember(Name = "configuration", EmitDefaultValue = false)]
public ViewConfiguration Configuration { get; }

Property Value

ViewConfiguration

ContainerViews

The set of container views.

[DataMember(Name = "containerViews", EmitDefaultValue = false)]
public ISet<ContainerView> ContainerViews { get; }

Property Value

ISet<ContainerView>

DeploymentViews

The set of deployment views.

[DataMember(Name = "deploymentViews", EmitDefaultValue = false)]
public ISet<DeploymentView> DeploymentViews { get; }

Property Value

ISet<DeploymentView>

DynamicViews

The set of dynamic views.

[DataMember(Name = "dynamicViews", EmitDefaultValue = false)]
public ISet<DynamicView> DynamicViews { get; }

Property Value

ISet<DynamicView>

FilteredViews

The set of filtered views.

[DataMember(Name = "filteredViews", EmitDefaultValue = false)]
public ISet<FilteredView> FilteredViews { get; }

Property Value

ISet<FilteredView>

Model

References the model that owns every view in the set.

public Model Model { get; set; }

Property Value

Model

SystemContextViews

The set of system context views.

[DataMember(Name = "systemContextViews", EmitDefaultValue = false)]
public ISet<SystemContextView> SystemContextViews { get; }

Property Value

ISet<SystemContextView>

SystemLandscapeViews

The set of system landscape views.

[DataMember(Name = "systemLandscapeViews", EmitDefaultValue = false)]
public ISet<SystemLandscapeView> SystemLandscapeViews { get; }

Property Value

ISet<SystemLandscapeView>

Methods

CopyLayoutInformationFrom(ViewSet)

Copies layout information from matching views in another view set.

public void CopyLayoutInformationFrom(ViewSet source)

Parameters

source ViewSet

The source view set that provides layout information.

CreateComponentView(Container, string, string)

Creates a component view for the supplied container.

public ComponentView CreateComponentView(Container container, string key, string description)

Parameters

container Container

The container in scope.

key string

The unique key for the view.

description string

The view description.

Returns

ComponentView

The created ComponentView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateContainerView(SoftwareSystem, string, string)

Creates a container view for the supplied software system.

public ContainerView CreateContainerView(SoftwareSystem softwareSystem, string key, string description)

Parameters

softwareSystem SoftwareSystem

The software system in scope.

key string

The unique key for the view.

description string

The view description.

Returns

ContainerView

The created ContainerView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateDeploymentView(SoftwareSystem, string, string)

Creates a deployment view, where the scope of the view is the specified software system.

public DeploymentView CreateDeploymentView(SoftwareSystem softwareSystem, string key, string description)

Parameters

softwareSystem SoftwareSystem

the SoftwareSystem object representing the scope of the view

key string

the key for the deployment view (must be unique)

description string

a description of the view

Returns

DeploymentView

a DeploymentView object

Exceptions

ArgumentException

Thrown when softwareSystem is null or key is already used by another view.

CreateDeploymentView(string, string)

Creates a deployment view.

public DeploymentView CreateDeploymentView(string key, string description)

Parameters

key string

The unique key for the view.

description string

The view description.

Returns

DeploymentView

The created DeploymentView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateDynamicView(Container, string, string)

Creates a container-scoped dynamic view.

public DynamicView CreateDynamicView(Container container, string key, string description)

Parameters

container Container

The container in scope.

key string

The unique key for the view.

description string

The view description.

Returns

DynamicView

The created DynamicView.

Exceptions

ArgumentException

Thrown when container is null or key is already used by another view.

CreateDynamicView(SoftwareSystem, string, string)

Creates a software-system-scoped dynamic view.

public DynamicView CreateDynamicView(SoftwareSystem softwareSystem, string key, string description)

Parameters

softwareSystem SoftwareSystem

The software system in scope.

key string

The unique key for the view.

description string

The view description.

Returns

DynamicView

The created DynamicView.

Exceptions

ArgumentException

Thrown when softwareSystem is null or key is already used by another view.

CreateDynamicView(string, string)

Creates an unscoped dynamic view.

public DynamicView CreateDynamicView(string key, string description)

Parameters

key string

The unique key for the view.

description string

The view description.

Returns

DynamicView

The created DynamicView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateFilteredView(StaticView, string, string, FilterMode, params string[])

Creates a FilteredView on top of an existing static view.

public FilteredView CreateFilteredView(StaticView view, string key, string description, FilterMode mode, params string[] tags)

Parameters

view StaticView

the static view to base the FilteredView upon

key string

the key for the filtered view (must be unique)

description string

a description of the filtered view

mode FilterMode

whether to Include or Exclude elements/relationships based upon their tag

tags string[]

the tags to include or exclude

Returns

FilteredView

The created FilteredView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateSystemContextView(SoftwareSystem, string, string)

Creates a system context view for the supplied software system.

public SystemContextView CreateSystemContextView(SoftwareSystem softwareSystem, string key, string description)

Parameters

softwareSystem SoftwareSystem

The software system in scope.

key string

The unique key for the view.

description string

The view description.

Returns

SystemContextView

The created SystemContextView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

CreateSystemLandscapeView(string, string)

Creates a system landscape view for the current model.

public SystemLandscapeView CreateSystemLandscapeView(string key, string description)

Parameters

key string

The unique key for the view.

description string

The view description.

Returns

SystemLandscapeView

The created SystemLandscapeView.

Exceptions

ArgumentException

Thrown when key is already used by another view.

GetFilteredViewWithKey(string)

Finds the filtered view with the specified key.

public FilteredView GetFilteredViewWithKey(string key)

Parameters

key string

The view key to locate.

Returns

FilteredView

The matching filtered view, or null when no filtered view uses that key.

Exceptions

ArgumentException

Thrown when key is null.

GetViewWithKey(string)

Finds the non-filtered view with the specified key.

public View GetViewWithKey(string key)

Parameters

key string

The view key to locate.

Returns

View

The matching view, or null when no view uses that key.

Exceptions

ArgumentException

Thrown when key is null.

Hydrate()

Reconnects deserialized views to the current model graph.

public void Hydrate()