Skip to content

Releases: unitycontainer/abstractions

3.1.2.174

11 Jan 00:13
Compare
Choose a tag to compare

Maintenance release

Added minor optimizations to enable integration with Microsoft.Extensions.DependencyInjection.2.*

3.1.1.172

30 Dec 06:31
Compare
Choose a tag to compare

Maintenance release

Replaced Dictionary<> in HierarchicalLifetimeManager implementation with ConcurrentDictionary<>.

3.1.0.168

30 Dec 03:11
Compare
Choose a tag to compare

This release

This release adds new features and interfaces.

New features

3.0.0.160

20 Dec 14:33
b0834de
Compare
Choose a tag to compare

This Release

This release has a lot of modifications and breaking changes. The changes are required to enable new features and optimizations.

Breaking changes

  • #6 Finally added built-in, 'fast' mechanism to check if type is registered bool IsRegistered(...); (High impact)

  • #22 Replaced all references to NamedTypeBuildKey with INamedType. (Low impact)

  • #23 Renamed IDependencyResolverPolicy into IResolverPolicy (Affects resolution of overridden dependencies)

  • #27 Merged FactoryDelegateBuildPlanPolicy with InjectionConstructor (Low impact)

  • #30 Added Parent reference to IBuilderContext (New feature)

  • #31 Added return type and extra argument to PreBuildUp and PostBuildUp (High impact for strategy implementations)

2.4.0.150

18 Dec 01:50
Compare
Choose a tag to compare

This Release

This release is primarily addresses extending of strategy chains to support multiple types of strategies. These changes are required to implement custom Property, Method, and Constructor selectors.

Breaking changes

  • #20 A non generic interface IStagedStrategyChain has been retired. Generic interface IStagedStrategyChain<TStageEnum> has been modified to accept strategy type argument. StagedStrategyChain has been modified to allow different strategy types.
    In order to iterate through strategies just use IEnumerable<...>.

  • #21 IPolicyList no longer accepts object as a Build Key. Legacy API was moved to Extension Methods implementation.

Semantic Versioning

This release breaks several interfaces and should have been released as v3.0.0. It has been long weekend of coding... Apologies for the inconvenience.

2.3.0.122

19 Nov 16:47
Compare
Choose a tag to compare

Due to this bug fix sequence of steps during building of objects has changed. Previously strategies were called in this order:

...
TypeMapping,
Lifetime,
PreCreation,
...

Now Lifetime and TypeMapping where reversed and Lifetime is called first. Here is the modified UnityBuildStage

   public enum UnityBuildStage
    {
        /// <summary>
        /// First stage. By default, nothing happens here.
        /// </summary>
        Setup,

        /// <summary>
        /// Third stage. lifetime managers are checked here,
        /// and if they're available the rest of the pipeline is skipped.
        /// </summary>
        Lifetime,

        /// <summary>
        /// Second stage. Type mapping occurs here.
        /// </summary>
        TypeMapping,

        /// <summary>
        /// Fourth stage. Reflection over constructors, properties, etc. is
        /// performed here.
        /// </summary>
        PreCreation,

        /// <summary>
        /// Fifth stage. Instance creation happens here.
        /// </summary>
        Creation,

        /// <summary>
        /// Sixth stage. Property sets and method injection happens here.
        /// </summary>
        Initialization,

        /// <summary>
        /// Seventh and final stage. By default, nothing happens here.
        /// </summary>
        PostInitialization
    }

This change should not affect casual users of the container. Developers of Extensions that rely on this sequence of stages should verify if the change might have broken the extension.

2.2.1.118

15 Nov 00:36
Compare
Choose a tag to compare

Bug fix

Work related to fixing issue described here

Cleanup

Removed

  • IDependencyResolverTrackerPolicy
  • IBuilderAware

These interfaces alone with its policies were invoked during registration and contributed to slowing down performance. Since it is not being used internally within Unity it was removed to speed up performance.

2.2.0.102

12 Nov 01:18
Compare
Choose a tag to compare

New Features:

New InjectionConstructor(params Type[] types)

Injection constructor could be specified by providing either arguments or types of arguments of the constructor:

Select default constructor:

container.RegisterType<SomeType>(new InjectionConstructor());

Select constructor with SomeType(int, string, float) signature and provide values:

container.RegisterType<SomeType>(new InjectionConstructor(0, string.Empty, 0.0f));

Select constructor with SomeType(string, string, string) signature and provide values for last two:

container.RegisterType<SomeType>(
    new InjectionConstructor(
        new ResolvedParameter(typeof(string)), string.Empty, string.Empty)));

Select constructor with SomeType(string, string, IUnityContainer) signature and provide values for last two:

container.RegisterType<SomeType>( 
    new InjectionConstructor(new Type[] { typeof(string), typeof(string), typeof(IUnityContainer) })));

Note: This change could be breaking and affect selection of a constructor with all parameters of type Type: Constructor(Type type1, Type type2)

Changes to HierarchicalLifetimeManager

Class HierarchicalLifetimeManager now implements IHierarchicalLifetimePolicy interface.
This interface adds method CrateScope() and allows registration of hierarchical lifetime managers with child containers.

RegisterSingleton<>()

Added lineup of extension methods for registering Singletons

2.1.0.82

28 Oct 22:11
Compare
Choose a tag to compare

Due to changes in IPolicyList interface and possible breaking changes for extensions, minor version has been increased.

This and other changes are required to support new development. One of the main goals to enable support for Microsoft.Extensions.DependencyInjection.

v2.0.2

23 Oct 22:12
Compare
Choose a tag to compare
  • Bug fixes
  • Added [assembly:CLSCompliant(true)]
  • Added [assembly:SecurityTransparent]