RuleBasedPlacementValidator
AUTO-GENERATED FILE – DO NOT EDIT MANUALLY
This page documents the supported public API surface only. Private, internal, benchmark, test, and implementation-detail types are intentionally omitted.
Declaration
Summary
Placement validator that evaluates a set of IPlacementRule instances.
Metadata
Namespace: GridPlacement.Core.Validation
Source File: cs/Core/Validation/RuleBasedPlacementValidator.cs
Assembly: GridPlacement.Core
Type: class
Implements
IPlacementValidator
Constructors
RuleBasedPlacementValidator
Initializes a new instance of the RuleBasedPlacementValidator class.
Parameters
| Name | Description |
|---|---|
rules | The rules to apply when validating placement. |
configProvider | Optional configuration provider for validation settings. |
Methods
ValidatePlacement
Validates a placement request.
Parameters
| Name | Description |
|---|---|
x | The X coordinate. |
y | The Y coordinate. |
placeableId | The placeable identifier. |
Returns
true if placement is valid; otherwise false.
ValidatePlacement
Validates a placement request with an additional context payload.
Parameters
| Name | Description |
|---|---|
x | The X coordinate. |
y | The Y coordinate. |
placeableId | The placeable identifier. |
context | Additional validation context. |
Returns
true if placement is valid; otherwise false.
GetValidationResult
Gets a validation result containing any errors and warnings for the placement request.
Parameters
| Name | Description |
|---|---|
x | The X coordinate. |
y | The Y coordinate. |
placeableId | The placeable identifier. |
Returns
The validation result.
IsPlacementAllowed
Returns whether placement is allowed for the given request.
Parameters
| Name | Description |
|---|---|
x | The X coordinate. |
y | The Y coordinate. |
placeableId | The placeable identifier. |
Returns
true if placement is allowed; otherwise false.