Struct RuleViolation<TNodeId, TEdgeId>
- Namespace
- SpatialNET.Network
- Assembly
- SpatialNET.Network.dll
A violation of a SpatialNET.Network.NetworkRule (ADR 0052).
public readonly record struct RuleViolation<TNodeId, TEdgeId> : IEquatable<RuleViolation<TNodeId, TEdgeId>> where TNodeId : notnull, IEquatable<TNodeId> where TEdgeId : notnull, IEquatable<TEdgeId>Type Parameters
TNodeId-
The node id.
TEdgeId-
The edge id.
Implements
Inherited Members
Constructors
RuleViolation(string, RuleSeverity, ElementKind, TNodeId, TEdgeId?, int, int, int, int?, Coordinate)
A violation of a SpatialNET.Network.NetworkRule (ADR 0052).
public RuleViolation(string RuleId, RuleSeverity Severity, ElementKind Kind, TNodeId Node, TEdgeId? Edge, int TypeId, int Count, int Min, int? Max, Coordinate Location)Parameters
RuleIdstring-
The id of the rule.
SeverityRuleSeverity-
The severity of the rule.
KindElementKind-
Whether a node rule or an edge rule was violated.
NodeTNodeId-
The node that was checked; for an edge rule, the end of the edge where the edges were counted.
EdgeTEdgeId?-
Only for an edge rule: the edge that was checked; the default value for a node rule.
TypeIdint-
The type of the checked element (the node, or the edge).
Countint-
The count that was found.
Minint-
The smallest allowed count.
Maxint?-
The largest allowed count;
nullfor no upper limit. LocationCoordinate-
Where
Nodelies.
Properties
Count
The count that was found.
public int Count { get; init; }Property Value
Edge
Only for an edge rule: the edge that was checked; the default value for a node rule.
public TEdgeId? Edge { get; init; }Property Value
- TEdgeId?
Kind
Whether a node rule or an edge rule was violated.
public ElementKind Kind { get; init; }Property Value
Location
Where Node lies.
public Coordinate Location { get; init; }Property Value
Max
The largest allowed count; null for no upper limit.
public int? Max { get; init; }Property Value
- int?
Min
The smallest allowed count.
public int Min { get; init; }Property Value
Node
The node that was checked; for an edge rule, the end of the edge where the edges were counted.
public TNodeId Node { get; init; }Property Value
- TNodeId
RuleId
The id of the rule.
public string RuleId { get; init; }Property Value
Severity
The severity of the rule.
public RuleSeverity Severity { get; init; }Property Value
TypeId
The type of the checked element (the node, or the edge).
public int TypeId { get; init; }