Table of Contents

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

RuleId string

The id of the rule.

Severity RuleSeverity

The severity of the rule.

Kind ElementKind

Whether a node rule or an edge rule was violated.

Node TNodeId

The node that was checked; for an edge rule, the end of the edge where the edges were counted.

Edge TEdgeId?

Only for an edge rule: the edge that was checked; the default value for a node rule.

TypeId int

The type of the checked element (the node, or the edge).

Count int

The count that was found.

Min int

The smallest allowed count.

Max int?

The largest allowed count; null for no upper limit.

Location Coordinate

Where Node lies.

Properties

Count

The count that was found.

public int Count { get; init; }

Property Value

int

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

ElementKind

Location

Where Node lies.

public Coordinate Location { get; init; }

Property Value

Coordinate

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

int

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

string

Severity

The severity of the rule.

public RuleSeverity Severity { get; init; }

Property Value

RuleSeverity

TypeId

The type of the checked element (the node, or the edge).

public int TypeId { get; init; }

Property Value

int