Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Features

Nikolay Pianikov edited this page Mar 6, 2017 · 51 revisions
  • Supports .NETStandard 1.0 and higher, .net core 1.0/framework 4.5/portable and higher.

  • Simple. Supports fluent API.

  • Fast.

  • Easiest way for TDD.

  • Supports configuring of IoC containers via:

    Fluent API

    Aspect-oriented (attributes)

    Compiled-on-demand CSharp

    Json. For this case it is not necessary to have any additional references to IoC libraries, thus nearly any code could work according to IoC pattern without any additional changes. For example, this sample project does not know about IoC at all. It is easy to create your own formats.

  • Supports DI specified by:

    contract - on or more types

    state - ordered type(s) of state

    tag - represented by the value(s)

  • Supports hierarchy of containers.

  • Each registration could be removed, so each container could be reused.

  • Fully extensible by overriding implementations of behaviors described via the interfaces in the contracts assembly.

  • It provides an ability to use states during resolving. For example.

  • There is a set of pluggable features:

    Child containers - supports the resolving of child containers. It is possible to use your own implementation of IContainer.

    Lifetimes - supports lifetimes (Singleton, AutoDisposing, PerContainer, PerResolve, PerThread, PerState). It is easy to extend by implementing ILifetime.

    Scopes - supports scopes (Internal, Global). It is easy to extend by implementing IScope.

    Key comaprers - supports key comparers (AnyTag, AnyState, AnyTagAnyState). It is easy to extend by implementing IKeyComparer.

    Enumerables - supports resolving via IEnumerable<>. Resolve all elements of specified contract.

    Observables - supports resolving via IObservable<>. Resolve all elements of specified contract.

    Tasks - supports injection via Task<>.

    Resolvers - supports resolving via IResolver<>, IProvider<>, Func<>.

    And others. For example the feature "Tasks" allows injection of tasks.

        public EventRegistry(
             Task<IResolver> resolver,
             Task<IEventBroker> eventBroker,
             [State(0, typeof(string))] Task<IResolver<string, ILog>> logResolver)
        {
            logResolver.Start();
            resolver.Start();
            eventBroker.Start();
            Task.WaitAll(resolver, eventBroker, logResolver);
            ...
        }
Clone this wiki locally