RuleResult
RuleResult
Results from placement rule validation. RuleResult encapsulates the outcome of evaluating a placement rule, storing validation issues, success state, and contextual information for debugging and logging. The class supports both incremental construction (for building issues during validation) and complete construction (for finished results). Success is determined by the absence of validation issues. Ported from: godot/addons/grid_building/systems/placement/validators/placement_rules/rule_result.gd
Project: GridPlacement v6.0
Layer: Godot
Source: Godot/Core/Validation/RuleResult.cs
Namespace: GridBuilding.Core.Validation
Kind: class
Parsing Method: AST-based (Roslyn) - NOT regex
⚠️ IMPORTANT: This documentation was generated using AST parsing, not regex.
Properties
Rule
The rule that was tested.
IssueCount
Returns the count of issues.
Methods
Build
Factory for creating a finished rule result. Creates an immutable result with all validation data complete.
Returns: RuleResult
Parameters:
IPlacementRule ruleIEnumerable<string> issues
AddIssue
Adds a single validation issue to the result.
Returns: void
Parameters:
string issue
AddIssues
Adds multiple validation issues to the result.
Returns: void
Parameters:
IEnumerable<string> issues
IsSuccessful
Returns whether the rule validation was successful. A rule is considered successful if no validation issues were found.
Returns: bool
IsEmpty
Backward compatibility shim expected by legacy validation code which called is_empty on RuleResult.
Returns: bool
GetIssues
Returns a copy of all issues.
Returns: List<string>