Table of Contents

Class Component

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

A component (a grouping of related functionality behind an interface that runs inside a container).

[DataContract]
public sealed class Component : StaticStructureElement, IEquatable<Component>
Inheritance
Component
Implements
Inherited Members

Properties

CanonicalName

Gets the canonical name for this component.

public override string CanonicalName { get; }

Property Value

string

CodeElements

The implementation type (e.g. a fully qualified interface/class name).

[DataMember(Name = "code", EmitDefaultValue = false)]
public ISet<CodeElement> CodeElements { get; }

Property Value

ISet<CodeElement>

Container

The container that this component belongs to.

public Container Container { get; }

Property Value

Container

Parent

The container that owns this component.

public override Element Parent { get; set; }

Property Value

Element

Size

The size of this component (e.g. lines of code).

[DataMember(Name = "size", EmitDefaultValue = true)]
public long Size { get; set; }

Property Value

long

Technology

The technology associated with this component (e.g. Spring Bean).

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

Property Value

string

Type

Gets or sets the primary implementation type for this component.

public string Type { get; set; }

Property Value

string

Methods

AddSupportingType(string)

Adds a supporting implementation type to this component.

public CodeElement AddSupportingType(string type)

Parameters

type string

The fully qualified type name to associate with the component.

Returns

CodeElement

The created supporting CodeElement.

Equals(Component)

Compares this component with another component by canonical identity.

public bool Equals(Component component)

Parameters

component Component

The component to compare with.

Returns

bool

true when both components represent the same model element; otherwise, false.

GetRequiredTags()

Returns the tags that are always applied to components.

public override List<string> GetRequiredTags()

Returns

List<string>

The required component tags.