Table of Contents

Class DynamicView

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

A dynamic view, used to describe behaviour between static elements at runtime.

[DataContract]
public sealed class DynamicView : View
Inheritance
DynamicView
Inherited Members

Properties

Element

References the element that defines the scope of the view, when the view is scoped.

public Element Element { get; set; }

Property Value

Element

ElementId

Stores the ID of the scoped element for serialization.

[DataMember(Name = "elementId", EmitDefaultValue = false)]
public string ElementId { get; set; }

Property Value

string

Model

Stores the model whose static elements participate in this dynamic view.

public override Model Model { get; set; }

Property Value

Model

Name

Returns the default name shown for this dynamic view.

public override string Name { get; }

Property Value

string

Relationships

Returns the relationships ordered by their dynamic sequence label.

public override ISet<RelationshipView> Relationships { get; }

Property Value

ISet<RelationshipView>

Methods

Add(Relationship)

Adds a specific relationship to this dynamic view, with the original description.

public RelationshipView Add(Relationship relationship)

Parameters

relationship Relationship

the Relationship to add

Returns

RelationshipView

a RelationshipView

Exceptions

ArgumentException

Thrown when relationship is null.

Add(Relationship, string)

Adds a specific relationship to this dynamic view, with an overidden description.

public RelationshipView Add(Relationship relationship, string description)

Parameters

relationship Relationship

the Relationship to add

description string

the overidden description

Returns

RelationshipView

a RelationshipView

Exceptions

ArgumentException

Thrown when relationship is null.

Add(StaticStructureElement, StaticStructureElement)

Adds the first matching relationship between the supplied source and destination.

public RelationshipView Add(StaticStructureElement source, StaticStructureElement destination)

Parameters

source StaticStructureElement

The source element.

destination StaticStructureElement

The destination element.

Returns

RelationshipView

The created relationship view.

Add(StaticStructureElement, string, StaticStructureElement)

Adds a relationship between the supplied elements with an overridden description.

public RelationshipView Add(StaticStructureElement source, string description, StaticStructureElement destination)

Parameters

source StaticStructureElement

The source element.

description string

The description shown for the interaction.

destination StaticStructureElement

The destination element.

Returns

RelationshipView

The created relationship view.

Add(StaticStructureElement, string, string, StaticStructureElement)

Adds a relationship between the supplied elements, selecting a matching model relationship by description and optional technology.

public RelationshipView Add(StaticStructureElement source, string description, string technology, StaticStructureElement destination)

Parameters

source StaticStructureElement

The source element.

description string

The description shown for the interaction.

technology string

The technology used to disambiguate matching relationships.

destination StaticStructureElement

The destination element.

Returns

RelationshipView

The created relationship view.

Exceptions

ArgumentException

Thrown when a source or destination is missing, or when no matching relationship exists.

CheckElementCanBeAdded(Element)

protected override void CheckElementCanBeAdded(Element elementToBeAdded)

Parameters

elementToBeAdded Element

EndParallelSequence()

Ends the current parallel numbering branch without carrying the number back to the parent sequence.

public void EndParallelSequence()

EndParallelSequence(bool)

Ends the current parallel numbering branch.

public void EndParallelSequence(bool endAllParallelSequencesAndContinueNumbering)

Parameters

endAllParallelSequencesAndContinueNumbering bool

When true, continues numbering from the completed parallel branch.

StartParallelSequence()

Starts a nested parallel numbering branch for subsequent interactions.

public void StartParallelSequence()