DefaultPlacementValidator

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

1
public class DefaultPlacementValidator : IPlacementValidator

Summary

Simple core implementation of IPlacementValidator used by tests and POCS placement flows. It enforces a few basic invariants:

  • Coordinates must be non-negative.
  • placeableId must be non-empty.

More complex rule and bounds logic should live in higher-level validators or rule engines; this type is intentionally minimal and engine-agnostic.

Metadata

Namespace: GridPlacement.Core.Validation

Source File: cs/Core/Validation/DefaultPlacementValidator.cs

Assembly: GridPlacement.Core

Type: class

Implements

  • IPlacementValidator

Methods

ValidatePlacement

1
2
3
4
5
public bool ValidatePlacement(
    float x,
    float y,
    string placeableId
)

Validates a placement request.

Parameters

NameDescription
xThe X coordinate.
yThe Y coordinate.
placeableIdThe placeable identifier.

Returns

true if placement is valid; otherwise false.


ValidatePlacement

1
2
3
4
5
6
public bool ValidatePlacement(
    float x,
    float y,
    string placeableId,
    Dictionary<string, object> context
)

Validates a placement request with an additional context payload.

Parameters

NameDescription
xThe X coordinate.
yThe Y coordinate.
placeableIdThe placeable identifier.
contextAdditional validation context.

Returns

true if placement is valid; otherwise false.


GetValidationResult

1
2
3
4
5
public ValidationResult GetValidationResult(
    float x,
    float y,
    string placeableId
)

Gets a validation result containing any errors for the placement request.

Parameters

NameDescription
xThe X coordinate.
yThe Y coordinate.
placeableIdThe placeable identifier.

Returns

The validation result.


IsPlacementAllowed

1
2
3
4
5
public bool IsPlacementAllowed(
    float x,
    float y,
    string placeableId
)

Returns whether placement is allowed for the given request.

Parameters

NameDescription
xThe X coordinate.
yThe Y coordinate.
placeableIdThe placeable identifier.

Returns

true if placement is allowed; otherwise false.