Table of Contents

Class NetworkRuleDefinition

Namespace
SpatialNET.Network
Assembly
SpatialNET.Network.dll

A rule as a row of plain values, so that the host can keep its rules in a table (ADR 0052). Resolve it with SpatialNET.Network.NetworkRule.FromDefinition(SpatialNET.Network.NetworkRuleDefinition,SpatialNET.Network.TypeRegistry).

public sealed record NetworkRuleDefinition : IEquatable<NetworkRuleDefinition>

Inheritance

Implements

Inherited Members

Constructors

NetworkRuleDefinition(string, RuleSeverity, RuleSubject, string, RuleEndFilter, string?, string, int, int?)

A rule as a row of plain values, so that the host can keep its rules in a table (ADR 0052). Resolve it with SpatialNET.Network.NetworkRule.FromDefinition(SpatialNET.Network.NetworkRuleDefinition,SpatialNET.Network.TypeRegistry).

public NetworkRuleDefinition(string Id, RuleSeverity Severity, RuleSubject Subject, string SubjectTypes, RuleEndFilter EndFilter, string? EndTypes, string CountTypes, int Min, int? Max)

Parameters

Id string

The id of the rule; not empty, unique within a list of rules.

Severity RuleSeverity

How serious a violation is.

Subject RuleSubject

Whether the rule checks nodes or edges.

SubjectTypes string

Pattern text of the types that are checked; several patterns separated by |.

EndFilter RuleEndFilter

For an edge rule, which ends are checked; SpatialNET.Network.RuleEndFilter.All for a node rule.

EndTypes string?

Pattern text of node types for SpatialNET.Network.RuleEndFilter.NodeIs and SpatialNET.Network.RuleEndFilter.NodeIsNot; null or empty otherwise.

CountTypes string

Pattern text of the edge types that are counted.

Min int

The smallest allowed count; not negative.

Max int?

The largest allowed count, or null for no upper limit; not below Min.

Properties

CountTypes

Pattern text of the edge types that are counted.

public string CountTypes { get; init; }

Property Value

string

EndFilter

For an edge rule, which ends are checked; SpatialNET.Network.RuleEndFilter.All for a node rule.

public RuleEndFilter EndFilter { get; init; }

Property Value

RuleEndFilter

EndTypes

Pattern text of node types for SpatialNET.Network.RuleEndFilter.NodeIs and SpatialNET.Network.RuleEndFilter.NodeIsNot; null or empty otherwise.

public string? EndTypes { get; init; }

Property Value

string?

Id

The id of the rule; not empty, unique within a list of rules.

public string Id { get; init; }

Property Value

string

Max

The largest allowed count, or null for no upper limit; not below Min.

public int? Max { get; init; }

Property Value

int?

Min

The smallest allowed count; not negative.

public int Min { get; init; }

Property Value

int

Severity

How serious a violation is.

public RuleSeverity Severity { get; init; }

Property Value

RuleSeverity

Subject

Whether the rule checks nodes or edges.

public RuleSubject Subject { get; init; }

Property Value

RuleSubject

SubjectTypes

Pattern text of the types that are checked; several patterns separated by |.

public string SubjectTypes { get; init; }

Property Value

string