Class RelationshipView
An instance of a model relationship in a View.
[DataContract]
public sealed class RelationshipView : IEquatable<RelationshipView>
- Inheritance
-
RelationshipView
- Implements
- Inherited Members
Fields
Response
Indicates whether this relationship view represents a response message in a dynamic view.
[DataMember(Name = "response", EmitDefaultValue = false)]
public bool? Response
Field Value
- bool?
Properties
Description
The description of this relationship (used in dynamic views only).
[DataMember(Name = "description", EmitDefaultValue = false)]
public string Description { get; set; }
Property Value
Id
The ID of the relationship.
[DataMember(Name = "id", EmitDefaultValue = false)]
public string Id { get; set; }
Property Value
- string
The ID of the relationship.
Order
The order of this relationship (used in dynamic views only; e.g. 1.0, 1.1, 2.0, etc).
[DataMember(Name = "order", EmitDefaultValue = false)]
public string Order { get; set; }
Property Value
Position
The position of the annotation along the line; 0 (start) to 100 (end).
[DataMember(Name = "position", EmitDefaultValue = false)]
public int? Position { get; set; }
Property Value
- int?
Relationship
References the model relationship represented by this view edge.
public Relationship Relationship { get; set; }
Property Value
Routing
The routing of the line.
[DataMember(Name = "routing", EmitDefaultValue = false)]
public Routing? Routing { get; set; }
Property Value
Vertices
The set of vertices used to render the relationship.
[DataMember(Name = "vertices", EmitDefaultValue = false)]
public List<Vertex> Vertices { get; }
Property Value
Methods
AddVertex(Vertex)
Adds a connector vertex to the end of this relationship view.
public void AddVertex(Vertex vertex)
Parameters
vertexVertexThe connector vertex to add.
Exceptions
- ArgumentNullException
Thrown when
vertexis null.
ClearVertices()
Removes all connector vertices from this relationship view.
public void ClearVertices()
Equals(RelationshipView)
Determines whether another relationship view represents the same relationship, order, and description.
public bool Equals(RelationshipView relationshipView)
Parameters
relationshipViewRelationshipViewThe relationship view to compare.
Returns
Equals(object)
Determines whether another object represents the same relationship view.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare.
Returns
- bool
true when the object is an equivalent RelationshipView; otherwise, false.
GetHashCode()
Returns a hash code based on the relationship identity and dynamic-view metadata.
public override int GetHashCode()
Returns
- int
A hash code for this relationship view.
RemoveVertex(Vertex)
Removes a connector vertex from this relationship view.
public bool RemoveVertex(Vertex vertex)
Parameters
vertexVertexThe connector vertex to remove.
Returns
- bool
true if the vertex was removed; otherwise, false.
Exceptions
- ArgumentNullException
Thrown when
vertexis null.
SetVertices(IEnumerable<Vertex>)
Replaces the connector vertices for this relationship view.
public void SetVertices(IEnumerable<Vertex> vertices)
Parameters
verticesIEnumerable<Vertex>The ordered connector vertices.
Exceptions
- ArgumentNullException
Thrown when
verticesis null.- ArgumentException
Thrown when
verticescontains a null entry.
ToString()
Returns the wrapped relationship text.
public override string ToString()
Returns
- string
A human-readable representation of the relationship view.