Skip to content

Prefer automatic binding over custom binding configurations #670

@BernieWhite

Description

@BernieWhite

Some built-in PSRule objects perform automatic binding of TargetName and TargetType. However, when a custom binding configuration is specified by the Binding.TargetName or Binding.TargetType options automatic binding may be overridden.

Specifically this occurs when the built-in object has one of the field specified with the custom configuration.
If none of the fields exist on the built-in object, PSRule fails through to values provided by the object target info.

This behaviour may not always be desired, particularly with common properties such as Name or FullName that may clash frequently.

An additional option should exist to allow automatic binding with target info supplied by the object to take priority over custom configuration.

This can not be the default in v1 because it would break existing functionality, but could be included in a future v2 release.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions