allowReassignment property

bool allowReassignment
getter/setter pair

Whether to allow reassigning registered dependencies and scope handlers.

When true, this allows:

  • Re-registering an object with the same DependencyKey
  • Replacing a ScopeHandler that handles the same scope

Useful for testing scenarios where you need to override existing registrations.

Implementation

var allowReassignment = false;