Releases · autofac/Autofac.Extras.AttributeMetadata · GitHub
Skip to content

Releases: autofac/Autofac.Extras.AttributeMetadata

v7.0.0

Choose a tag to compare

@tillig tillig released this 14 Aug 22:52
ee34b93

Breaking Changes

Removed the obsolete attribute-filtering API. These types were already marked [Obsolete] in 6.0.0 and are now gone, in favor of the equivalents in core Autofac's Autofac.Features.AttributeFilters namespace:

Removed Replacement in core Autofac
ParameterFilterAttribute Autofac.Features.AttributeFilters.ParameterFilterAttribute
WithKeyAttribute Autofac.Features.AttributeFilters.KeyFilterAttribute
WithMetadataAttribute Autofac.Features.AttributeFilters.MetadataFilterAttribute
AutofacAttributeExtensions.WithAttributeFilter() RegistrationExtensions.WithAttributeFiltering()

Autofac 9.3.2 is now the minimum version. 6.0.0 effectively required Autofac 6.0.0, so consumers still on Autofac 6, 7, or 8 will need to upgrade.

Nullable reference type annotations are enabled. Public signatures are now annotated, which can surface new nullability warnings in consuming code:

  • IMetadataProvider.GetMetadata returns IDictionary<string, object?>
  • MetadataHelper.GetMetadata and MetadataHelper.GetProperties return KeyValuePair<string, object?>
  • MetadataModule<TInterface, TMetadata>.ContainerBuilder is nullable, and TInterface now carries a notnull constraint

These are annotation changes only; the affected members remain binary compatible.

Other Changes

  • Added support for .NET 10, .NET 8, and .NET Standard 2.1; retained support for .NET Standard 2.0.
  • WithAttributedMetadata() can now be applied to individual registrations instead of only to assembly scanning, so RegisterType<T>() and RegisterAssemblyTypes() opt in the same way. (#11)
  • Updated Autofac.Mef to 8.0.1 and System.ComponentModel.Composition to 10.0.11.

v6.0.0

Choose a tag to compare

@tillig tillig released this 06 Oct 20:38

This is a compatibility release for Autofac 6.0.

Breaking change: Starting with Autofac 6.0, we now only target netstandard2.0 and netstandard2.1; we have removed the explicit target for net461. While this package was only targeting netstandard2.0 before, upgrading to this version will bring in Autofac v6 and the associated TFM change for that transitive dependency.

v5.0.0

Choose a tag to compare

@tillig tillig released this 31 Jan 18:55

This release is an update for compatibility with Autofac 5.0.0 and requires that new version. Autofac 5.0.0 does have some breaking changes - see the Autofac release notes for more information.

Dependencies updated to Autofac 5.0.0 and Autofac.Mef 5.0.0.

v4.1.0

Choose a tag to compare

@alexmg alexmg released this 10 Sep 14:50
  • Updated to .NET Standard 2.0
  • Updated Autofac.Mef dependency to 4.1.0

v4.0.2

Choose a tag to compare

@tillig tillig released this 26 Aug 16:48

Fix #4: Updated to work with later versions of Autofac where modules can detect nested lifetime scope registrations.

v4.0.1

Choose a tag to compare

@alexmg alexmg released this 18 Jan 11:48

The attribute filtering related types and registration extension method have been marked as obsolete as the feature has been moved into the core Autofac package.

This will make the feature available on .NET Core as Autofac.Extras.AttributeMetadata cannot be converted due to its MEF dependency.

The relevant types can be found in the Autofac.Features.AttributeFilters namespace in the Autofac package.

Note the following renames when migrating to the types in Autofac core:

  • WithKeyAttribute -> KeyFilterAttribute
  • WithMetadataAttribute -> MetadataFilterAttribute
  • WithAttributeFilter -> WithAttributeFiltering

The Obsolete attributes applied include the above rename information and are set at the Warning level to prevent build failures.

v4.0.0

Choose a tag to compare

@tillig tillig released this 03 Jan 20:30
  • Renamed to Autofac.Extras.AttributeMetadata.
  • Updated to .NET 4.5.
  • Added support for Autofac 4.0.

v3.3.0

Choose a tag to compare

@tillig tillig released this 03 Jan 20:29

This release occurred prior to switching Autofac components to separate repositories.

3.3.0

Updated for .NET 4.0.

3.2.1

  • Fixed the NuGet package requirements so the core Autofac version and NuGet minimum requirement version line up.

3.2.0

  • Added support for generating custom metadata structures based on attributes to augment the existing simple name/value pair property mechanism. (Issue autofac/Autofac#519)

3.1.1

  • Updated versioning scheme so assembly version changes with each release. (Issue autofac/Autofac#502)

3.1.0

  • Added WithMetadataAttribute and WithMetadataFilter registration extensions.
  • Added ability to filter constructor dependencies by key using attributes. Refactored attribute filtering mechanism so attribute implementations can define their own resolution criteria, enabling a single filter extension to be applied during registration but with any number of actual filters that can be used.
  • Allowing the MetadataAttribute to be inherited so it doesn't need to be manually re-applied to custom metadata attributes.