You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Registrations for attribute metadata on type seems to differ based on whether the registration comes from assembly scanning or direct individual registration. There is a WithAttributedMetadata extension to scan assemblies and register types with attribute metadata, but if you're registering individual types we assume use of the AttributedMetadataModule which is nice and automatic but inconsistent.
The inconsistency makes it hard to put pieces together and get things to line up right.
Desired Solution
A WithAttributedMetadata extension for individual registrations could even out the inconsistencies.
Make sure that if both the AttributedMetadataModuleand the WithAttributedMetadata extension are used that we don't have conflict issues. (I think worst case it'd just set the same metadata twice, but... just something to consider.)
Alternatives You've Considered
Documentation on how to use the MetadataHelper and the standard WithMetadata() extension could sidestep this need, but... it'd be much easier to just add a nice extension method for convenience.
Problem Statement
Registrations for attribute metadata on type seems to differ based on whether the registration comes from assembly scanning or direct individual registration. There is a
WithAttributedMetadata
extension to scan assemblies and register types with attribute metadata, but if you're registering individual types we assume use of theAttributedMetadataModule
which is nice and automatic but inconsistent.The inconsistency makes it hard to put pieces together and get things to line up right.
Desired Solution
A
WithAttributedMetadata
extension for individual registrations could even out the inconsistencies.Make sure that if both the
AttributedMetadataModule
and theWithAttributedMetadata
extension are used that we don't have conflict issues. (I think worst case it'd just set the same metadata twice, but... just something to consider.)Alternatives You've Considered
Documentation on how to use the
MetadataHelper
and the standardWithMetadata()
extension could sidestep this need, but... it'd be much easier to just add a nice extension method for convenience.Additional Context
Discovered while looking at some of the documentation inconsistencies in autofac/Documentation#144.
The text was updated successfully, but these errors were encountered: