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
Idstring-
The id of the rule; not empty, unique within a list of rules.
SeverityRuleSeverity-
How serious a violation is.
SubjectRuleSubject-
Whether the rule checks nodes or edges.
SubjectTypesstring-
Pattern text of the types that are checked; several patterns separated by
|. EndFilterRuleEndFilter-
For an edge rule, which ends are checked; SpatialNET.Network.RuleEndFilter.All for a node rule.
EndTypesstring?-
Pattern text of node types for SpatialNET.Network.RuleEndFilter.NodeIs and SpatialNET.Network.RuleEndFilter.NodeIsNot;
nullor empty otherwise. CountTypesstring-
Pattern text of the edge types that are counted.
Minint-
The smallest allowed count; not negative.
Maxint?-
The largest allowed count, or
nullfor no upper limit; not belowMin.
Properties
CountTypes
Pattern text of the edge types that are counted.
public string CountTypes { get; init; }Property Value
EndFilter
For an edge rule, which ends are checked; SpatialNET.Network.RuleEndFilter.All for a node rule.
public RuleEndFilter EndFilter { get; init; }Property Value
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
Id
The id of the rule; not empty, unique within a list of rules.
public string Id { get; init; }Property Value
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
Severity
How serious a violation is.
public RuleSeverity Severity { get; init; }Property Value
Subject
Whether the rule checks nodes or edges.
public RuleSubject Subject { get; init; }Property Value
SubjectTypes
Pattern text of the types that are checked; several patterns separated by |.
public string SubjectTypes { get; init; }