Table of Contents

Class ElementView

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

An instance of a model element (Person, Software System, Container or Component) in a View.

[DataContract]
public sealed class ElementView : IEquatable<ElementView>
Inheritance
ElementView
Implements
Inherited Members

Properties

Element

References the model element represented by this view node.

public Element Element { get; set; }

Property Value

Element

Id

The ID of the element.

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

Property Value

string

X

The horizontal position of the element when rendered.

[DataMember(Name = "x", EmitDefaultValue = true)]
public int X { get; set; }

Property Value

int

Y

The vertical position of the element when rendered.

[DataMember(Name = "y", EmitDefaultValue = true)]
public int Y { get; set; }

Property Value

int

Methods

Equals(ElementView)

Determines whether another element view represents the same element ID.

public bool Equals(ElementView elementView)

Parameters

elementView ElementView

The element view to compare.

Returns

bool

true when both views refer to the same element ID; otherwise, false.

Equals(object)

Determines whether another object represents the same element view.

public override bool Equals(object obj)

Parameters

obj object

The object to compare.

Returns

bool

true when the object is an equivalent ElementView; otherwise, false.

GetHashCode()

Returns a hash code based on the element identifier.

public override int GetHashCode()

Returns

int

A hash code for this element view.

ToString()

Returns the wrapped element text when available, otherwise the serialized identifier.

public override string ToString()

Returns

string

A human-readable representation of the element view.