PSRule icon indicating copy to clipboard operation
PSRule copied to clipboard

[FEATURE] Cleanup PreferTargetInfo option

Open BernieWhite opened this issue 5 months ago • 0 comments

Your suggestion

The option PreferTargetInfo was added in v1 to support better resolution of built-in objects with name and type binding instead of relying on generic binding options. It was added as disabled by default to prevent a breaking change.

Since when this was added a number of improvements have been added so this should now be not configurable and implicit.

New behaviour will be:

  • Objects that support target info will implement a public interface ITargetInfo.
  • Objects that will revert to binding configuration will not implement the interface.

Properties of the interface will be nullable, null values will revert to the binding configuration.

Alternatives

na

Additional context

  • #670

BernieWhite avatar Jul 27 '25 05:07 BernieWhite